WPDev.one
Core Function
View Source on Trac ↗

wp_cache_get()

wp_cache_get( mixed $key, mixed $group = '', mixed $force = false, mixed $found = null )

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

Parameters 3 required

Name / Type Description
(int

| string) $key The key under which the cache contents are stored.

Required
$group
string

Optional. Where the cache contents are grouped. Default empty.

bool

$force Optional. Whether to force an update of the local cache from the persistent cache. Default false.

Required
bool

$found Optional. Whether the key was found in the cache (passed by reference). Disambiguates a return of false, a storable value. Default null.

Required

Return Value

((mixed)
| false) The cache contents on success, false on failure to retrieve contents.

Function Information

Since Version
2.0.0
Source File
wp-includes/cache.php
Advertisement