Changeset 4931
- Timestamp:
- 02/18/2017 10:11:43 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-rosetta-roles/inc/class-plugin.php
r4929 r4931 432 432 */ 433 433 public function get_sub_project_ids( $project_id ) { 434 $cache_key = 'project:' . $project_id . ':childs'; 434 $last_changed = wp_cache_get_last_changed( self::$cache_group ); 435 436 $cache_key = 'project:' . $project_id . ':childs:' . $last_changed; 435 437 $cache = wp_cache_get( $cache_key, self::$cache_group ); 436 438 if ( false !== $cache ) { … … 480 482 481 483 /** 482 * Removes all of the project ids from the cache.484 * Updates `last_changed` value for the cache group. 483 485 */ 484 486 public function clear_project_cache() { 485 487 wp_cache_set( 'last_changed', microtime(), self::$cache_group ); 486 487 $projects = $this->get_all_projects();488 489 foreach ( $projects as $project ) {490 $cache_key = 'project:' . $project->id . ':childs';491 wp_cache_delete( $cache_key, self::$cache_group );492 }493 488 } 494 489
Note: See TracChangeset
for help on using the changeset viewer.