Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp cache get


Retrieves the cache contents from the cache by key and group.


<?php wp_cache_get$key$group$force$found ); ?>


(int/string) (required) the key to indicate the value.
Default: None
(string) (optional) this is a way of grouping data within the cache. Allows you to use the same key across different groups.
Default: None
(boolean) (optional) Whether to force an update of the local cache from the persistent cache (default is false)
Default: false
(&boolean) (optional) Whether key was found in the cache. Disambiguates a return of false, a storable value
Default: None


False on failure to retrieve contents or the cache contents on success

Change Log

Since: 2.0.0

Source File

wp_cache_get() is located in wp-includes/cache.php.


See also index of Function Reference and index of Template Tags.
This article is marked as in need of editing. You can help Codex by editing it.