On this page
wp_cache_get_last_changed( string $group ): string
Gets last changed date for the specified cache group.
Parameters
$groupstring Required-
Where the cache contents are grouped.
Return
string UNIX timestamp with microseconds representing when the group was last changed.
Source
File: wp-includes/functions.php. View all references
function wp_cache_get_last_changed( $group ) {
$last_changed = wp_cache_get( 'last_changed', $group );
if ( ! $last_changed ) {
$last_changed = microtime();
wp_cache_set( 'last_changed', $last_changed, $group );
}
return $last_changed;
}
Related
Uses
| Uses | Description |
|---|---|
| wp_cache_set() wp-includes/cache.php | Saves the data to the cache. |
| wp_cache_get() wp-includes/cache.php | Retrieves the cache contents from the cache by key and group. |
Used By
| Used By | Description |
|---|---|
| WP_Query::generate_cache_key() wp-includes/class-wp-query.php | Generate cache key. |
| _find_post_by_old_slug() wp-includes/query.php | Find the post ID for redirecting an old slug. |
| _find_post_by_old_date() wp-includes/query.php | Find the post ID for redirecting an old date. |
| WP_Term_Query::get_terms() wp-includes/class-wp-term-query.php | Retrieves the query results. |
| WP_Network_Query::get_networks() wp-includes/class-wp-network-query.php | Gets a list of networks matching the query vars. |
| WP_Site_Query::get_sites() wp-includes/class-wp-site-query.php | Retrieves a list of sites matching the query vars. |
| WP_Comment_Query::fill_descendants() wp-includes/class-wp-comment-query.php | Fetch descendants for located comments. |
| WP_Comment_Query::get_comments() wp-includes/class-wp-comment-query.php | Get a list of comments matching the query vars. |
| wp_get_archives() wp-includes/general-template.php | Displays archive links based on type and format. |
| WP_Query::get_posts() wp-includes/class-wp-query.php | Retrieves an array of posts based on query variables. |
| get_objects_in_term() wp-includes/taxonomy.php | Retrieves object IDs of valid taxonomy and term. |
| get_page_by_path() wp-includes/post.php | Retrieves a page given its path. |
| get_pages() wp-includes/post.php | Retrieves an array of pages (or hierarchical post type items). |
Changelog
| Version | Description |
|---|---|
| 4.7.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_cache_get_last_changed