Skip to content

Kirby 3.8.4

$apcucache->getOrSet()

Returns a value by either getting it from the cache or via the callback function which then is stored in the cache for future retrieval. This method cannot be used for null as value to be cached.

$apcucache->getOrSet(string $key, Closure $result, int $minutes = 0)

Parameters

Name Type Default
$key * string
$result * Closure
$minutes int 0

Parent class

Kirby\Cache\ApcuCache inherited from Kirby\Cache\Cache