Lines Matching refs:key
70 * public function get(string $key, mixed $default = null): mixed;
73 * @param string $key The unique key of this item in the cache.
74 * @param mixed $default Default value to return if the key does not exist.
79 * MUST be thrown if the $key string is not a legal value.
81 public function get_data(string $key, $default = null);
84 * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
88 * public function set(string $key, mixed $value, null|int|\DateInterval $ttl = null): bool;
91 * @param string $key The key of the item to store.
100 * MUST be thrown if the $key string is not a legal value.
102 public function set_data(string $key, array $value, ?int $ttl = null): bool;
105 * Delete an item from the cache by its unique key.
109 * public function delete(string $key): bool;
112 * @param string $key The unique cache key of the item to delete.
117 * MUST be thrown if the $key string is not a legal value.
119 public function delete_data(string $key): bool;