wp_cache_get( int|string $key, string $group = '', bool $force = false, bool $found = null )
Retrieves the cache contents from the cache by key and group.
Description
See also
Parameters
- $key
-
(Required) The key under which the cache contents are stored.
- $group
-
(Optional) Where the cache contents are grouped.
Default value: ''
- $force
-
(Optional) Whether to force an update of the local cache from the persistent cache.
Default value: false
- $found
-
(Optional) Whether the key was found in the cache (passed by reference). Disambiguates a return of false, a storable value.
Default value: null
Return
(bool|mixed) False on failure to retrieve contents or the cache contents on success
Source
File: wp-includes/cache.php
function wp_cache_get( $key, $group = '', $force = false, &$found = null ) {
global $wp_object_cache;
return $wp_object_cache->get( $key, $group, $force, $found );
}
Related
Uses
Uses | Description |
---|---|
wp-includes/cache.php: WP_Object_Cache::get() |
Retrieves the cache contents, if it exists. |
Used By
Used By | Description |
---|---|
wp-includes/deprecated.php: get_usermeta() |
Retrieve user metadata. |
wp-includes/deprecated.php: get_all_category_ids() |
Retrieves all category IDs. |
wp-includes/general-template.php: wp_get_archives() |
Display archive links based on type and format. |
wp-includes/general-template.php: get_calendar() |
Display calendar with days that have posts as links. |
wp-includes/class-wp-user.php: WP_User::get_data_by() |
Return only the main user fields |
wp-includes/class-wp-term.php: WP_Term::get_instance() |
Retrieve WP_Term instance. |
wp-includes/class-wp-network.php: WP_Network::get_instance() |
Retrieve a network from the database by its ID. |
wp-includes/class-wp-network.php: WP_Network::get_main_site_id() |
Returns the main site ID for the network. |
wp-includes/class-wp-network.php: WP_Network::get_by_path() |
Retrieve the closest matching network for a domain and path. |
wp-includes/class-wp-post.php: WP_Post::get_instance() |
Retrieve WP_Post instance. |
wp-includes/class-wp-comment.php: WP_Comment::get_instance() |
Retrieves a WP_Comment instance. |
wp-includes/class-wp-network-query.php: WP_Network_Query::get_networks() |
Gets a list of networks matching the query vars. |
wp-includes/comment.php: wp_count_comments() |
Retrieve total comments for blog or single post. |
wp-includes/comment.php: get_lastcommentmodified() |
The date the last comment was modified. |
wp-includes/bookmark.php: get_bookmark() |
Retrieve Bookmark data |
wp-includes/bookmark.php: get_bookmarks() |
Retrieves the list of bookmarks |
wp-includes/class-wp-embed.php: WP_Embed::find_oembed_post_id() |
Find the oEmbed cache post ID for a given cache key. |
wp-includes/ms-load.php: ms_load_current_site_and_network() |
Identifies the network and site of a requested domain and path and populates the corresponding network and site global objects as part of the multisite bootstrap process. |
wp-includes/link-template.php: get_adjacent_post() |
Retrieves the adjacent post. |
wp-includes/class-wp-site.php: WP_Site::get_instance() |
Retrieves a site from the database by its ID. |
wp-includes/class-wp-site.php: WP_Site::get_details() |
Retrieves the details for this site. |
wp-includes/ms-blogs.php: get_blog_details() |
Retrieve the details for a blog from the blogs table and blog options. |
wp-includes/meta.php: get_metadata() |
Retrieve metadata for the specified object. |
wp-includes/meta.php: metadata_exists() |
Determine if a meta key is set for a given object |
wp-includes/meta.php: update_meta_cache() |
Update the metadata cache for the specified objects. |
wp-includes/class-wp-theme.php: WP_Theme::cache_get() |
Gets theme data from cache. |
wp-includes/option.php: get_network_option() |
Retrieve a network’s option value based on the option name. |
wp-includes/option.php: add_network_option() |
Add a new network option. |
wp-includes/option.php: update_network_option() |
Update the value of a network option that was already added. |
wp-includes/option.php: get_site_transient() |
Get the value of a site transient. |
wp-includes/option.php: update_option() |
Update the value of an option that was already added. |
wp-includes/option.php: add_option() |
Add a new option. |
wp-includes/option.php: get_transient() |
Get the value of a transient. |
wp-includes/option.php: get_option() |
Retrieves an option value based on an option name. |
wp-includes/option.php: wp_load_alloptions() |
Loads and caches all autoloaded options, if available or all options. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::find_changeset_post_id() |
Find the changeset post ID for a given changeset UUID. |
wp-includes/class-wp-term-query.php: WP_Term_Query::get_terms() |
Get terms, based on query_vars. |
wp-includes/post.php: _get_last_post_time() |
Get the timestamp of the last time any post was modified or published. |
wp-includes/post.php: wp_mime_type_icon() |
Retrieve the icon for a MIME type. |
wp-includes/post.php: get_pages() |
Retrieve a list of pages (or hierarchical post type items). |
wp-includes/post.php: get_all_page_ids() |
Get a list of page IDs. |
wp-includes/post.php: get_page_by_path() |
Retrieves a page given its path. |
wp-includes/post.php: wp_count_posts() |
Count number of posts of a post type and if user has permissions to view. |
wp-includes/class-wp-site-query.php: WP_Site_Query::get_sites() |
Retrieves a list of sites matching the query vars. |
wp-includes/ms-functions.php: get_blog_id_from_url() |
Get a blog’s numeric ID from its URL. |
wp-includes/class-wp-comment-query.php: WP_Comment_Query::get_comments() |
Get a list of comments matching the query vars. |
wp-includes/class-wp-comment-query.php: WP_Comment_Query::fill_descendants() |
Fetch descendants for located comments. |
wp-includes/taxonomy.php: get_object_term_cache() |
Retrieves the taxonomy relationship to the term object id. |
wp-includes/taxonomy.php: update_object_term_cache() |
Updates the cache for the given term object ID(s). |
wp-includes/taxonomy.php: get_objects_in_term() |
Retrieve object_ids of valid taxonomy and term. |
wp-includes/functions.php: wp_cache_get_last_changed() |
Get last changed date for the specified cache group. |
wp-includes/functions.php: _get_non_cached_ids() |
Retrieve ids that are not already present in the cache. |
wp-includes/functions.php: is_blog_installed() |
Test whether ClassicPress is already installed. |
wp-admin/includes/user.php: WP_Privacy_Requests_Table::get_request_counts() |
Count number of requests for each status. |
wp-admin/includes/plugin.php: get_plugins() |
Check the plugins directory and retrieve all plugin files with plugin data. |
wp-admin/includes/class-wp-ms-sites-list-table.php: WP_MS_Sites_List_Table::column_users() |
Handles the users column output. |
Changelog
Version | Description |
---|---|
WP-2.0.0 | Introduced. |