phasync
Cache / getMultiple

Method

Cache::getMultiple

The values of $keys, by key: $default for those missing or expired.

Description#

public Cache::getMultiple(
    $keys,
    mixed $default = null
): array

Parameters#

$keys
$default mixed = null

Return values#

array

Errors / Exceptions#

ExceptionWhen
CacheKeyExceptionFor an invalid key

Examples#

Example 1
['a' => $a, 'b' => $b] = Swerve::cache()->getMultiple(['a', 'b']);

See also#