Changeset 55702
- Timestamp:
- 05/02/2023 11:24:52 AM (17 months ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment.php
r55641 r55702 3919 3919 */ 3920 3920 function wp_cache_set_comments_last_changed() { 3921 wp_cache_set ( 'last_changed', microtime(),'comment' );3921 wp_cache_set_last_changed( 'comment' ); 3922 3922 } 3923 3923 -
trunk/src/wp-includes/functions.php
r55642 r55702 7681 7681 $last_changed = wp_cache_get( 'last_changed', $group ); 7682 7682 7683 if ( ! $last_changed ) { 7684 $last_changed = microtime(); 7685 wp_cache_set( 'last_changed', $last_changed, $group ); 7686 } 7687 7688 return $last_changed; 7683 if ( $last_changed ) { 7684 return $last_changed; 7685 } 7686 7687 return wp_cache_set_last_changed( $group ); 7688 } 7689 7690 /** 7691 * Sets last changed date for the specified cache group to now. 7692 * 7693 * @since 6.3.0 7694 * 7695 * @param string $group Where the cache contents are grouped. 7696 * @return string UNIX timestamp when the group was last changed. 7697 */ 7698 function wp_cache_set_last_changed( $group ) { 7699 $previous_time = wp_cache_get( 'last_changed', $group ); 7700 7701 $time = microtime(); 7702 7703 wp_cache_set( 'last_changed', $time, $group ); 7704 7705 /** 7706 * Fires after a cache group `last_changed` time is updated. 7707 * This may occur multiple times per page load and registered 7708 * actions must be performant. 7709 * 7710 * @since 6.3.0 7711 * 7712 * @param string $group The cache group name. 7713 * @param int $time The new last changed time. 7714 * @param int|false $previous_time The previous last changed time. False if not previously set. 7715 */ 7716 do_action( 'wp_cache_set_last_changed', $group, $time, $previous_time ); 7717 7718 return $time; 7689 7719 } 7690 7720 -
trunk/src/wp-includes/ms-network.php
r54637 r55702 97 97 } 98 98 99 wp_cache_set ( 'last_changed', microtime(),'networks' );99 wp_cache_set_last_changed( 'networks' ); 100 100 } 101 101 -
trunk/src/wp-includes/ms-site.php
r55526 r55702 1282 1282 */ 1283 1283 function wp_cache_set_sites_last_changed() { 1284 wp_cache_set ( 'last_changed', microtime(),'sites' );1284 wp_cache_set_last_changed( 'sites' ); 1285 1285 } 1286 1286 -
trunk/src/wp-includes/post.php
r55701 r55702 7806 7806 */ 7807 7807 function wp_cache_set_posts_last_changed() { 7808 wp_cache_set ( 'last_changed', microtime(),'posts' );7808 wp_cache_set_last_changed( 'posts' ); 7809 7809 } 7810 7810 -
trunk/src/wp-includes/taxonomy.php
r55693 r55702 5039 5039 */ 5040 5040 function wp_cache_set_terms_last_changed() { 5041 wp_cache_set ( 'last_changed', microtime(),'terms' );5041 wp_cache_set_last_changed( 'terms' ); 5042 5042 } 5043 5043 -
trunk/src/wp-includes/user.php
r55657 r55702 5025 5025 */ 5026 5026 function wp_cache_set_users_last_changed() { 5027 wp_cache_set ( 'last_changed', microtime(),'users' );5028 } 5027 wp_cache_set_last_changed( 'users' ); 5028 }
Note: See TracChangeset
for help on using the changeset viewer.