WordPress.org

Codex

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

Function Reference/wp cache get

Description

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

Usage

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

Parameters

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

Return

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.

Related

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.