Changeset 20176 for trunk/wp-includes/class-wp-theme.php
- Timestamp:
- 03/14/2012 10:49:36 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-wp-theme.php
r20173 r20176 130 130 131 131 /** 132 * Stores an md5 hash of the theme root, to function as the cache key. 133 * 134 * @access private 135 * @var string 136 */ 137 private $cache_hash; 138 139 /** 132 140 * Flag for whether the themes cache bucket should be persistently cached. 133 141 * … … 172 180 $this->theme_root = $theme_root; 173 181 $this->stylesheet = $theme_dir; 182 $this->cache_hash = md5( $this->theme_root . '/' . $this->stylesheet ); 174 183 $theme_file = $this->stylesheet . '/style.css'; 175 184 … … 441 450 */ 442 451 private function cache_add( $key, $data ) { 443 return wp_cache_add( $key . '-' . $this-> theme_root . '/' . $this->stylesheet, $data, 'themes', self::$cache_expiration );452 return wp_cache_add( $key . '-' . $this->cache_hash, $data, 'themes', self::$cache_expiration ); 444 453 } 445 454 … … 456 465 */ 457 466 private function cache_get( $key ) { 458 return wp_cache_get( $key . '-' . $this-> theme_root . '/' . $this->stylesheet, 'themes' );467 return wp_cache_get( $key . '-' . $this->cache_hash, 'themes' ); 459 468 } 460 469 … … 467 476 public function cache_delete() { 468 477 foreach ( array( 'theme', 'screenshot', 'screenshot_count', 'files', 'headers' ) as $key ) 469 wp_cache_delete( $key . '-' . $this-> theme_root . '/' . $this->stylesheet, 'themes' );478 wp_cache_delete( $key . '-' . $this->cache_hash, 'themes' ); 470 479 } 471 480
Note: See TracChangeset
for help on using the changeset viewer.