lithium\storage\Cache::key()
Generates the cache key.
Parameters
-
mixed
$key
A string (or lambda/closure that evaluates to a string) that will be used as the cache key.
-
array
$data
If a lambda/closure is used as a key and requires arguments, pass them in here.
Returns
stringThe generated cache key.
Source
public static function key($key, $data = []) {
return is_object($key) ? $key($data) : $key;
}