WordPress.org

Make WordPress Core

Changeset 20328


Ignore:
Timestamp:
03/30/12 14:39:05 (2 years ago)
Author:
nacin
Message:

Clear theme cache after editing. Reduce default cache persistence to 1800. (Could go lower.) see #20331.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/theme-editor.php

    r20315 r20328  
    9595            fclose( $f ); 
    9696            $location .= '&updated=true'; 
     97            $theme->cache_delete(); 
    9798        } 
    9899    } 
  • trunk/wp-includes/class-wp-theme.php

    r20327 r20328  
    155155     * @var bool 
    156156     */ 
    157     private static $cache_expiration = 7200; 
     157    private static $cache_expiration = 1800; 
    158158 
    159159    /** 
     
    504504        foreach ( array( 'theme', 'screenshot', 'screenshot_count', 'files', 'headers', 'page_templates' ) as $key ) 
    505505            wp_cache_delete( $key . '-' . $this->cache_hash, 'themes' ); 
     506        $this->template = $this->textdomain_loaded = $this->theme_root_uri = $this->parent = $this->errors = $this->headers_sanitized = $this->name_translated = null; 
     507        $this->headers = array(); 
     508        $this->__construct( $this->stylesheet, $this->theme_root ); 
    506509    } 
    507510 
  • trunk/wp-includes/theme.php

    r20312 r20328  
    352352        } 
    353353        if ( ! is_int( $cache_expiration ) ) 
    354             $cache_expiration = 7200; 
     354            $cache_expiration = 1800; // half hour 
    355355    } else { 
    356         // Two hours is the default. 
    357         $cache_expiration = 7200; 
     356        $cache_expiration = 1800; // half hour 
    358357    } 
    359358 
Note: See TracChangeset for help on using the changeset viewer.