Lines Matching refs:key
74 * public function get(string $key, mixed $default = null): mixed;
77 * @param string $key The unique key of this item in the cache.
78 * @param mixed $default Default value to return if the key does not exist.
83 * MUST be thrown if the $key string is not a legal value.
85 public function get_data(string $key, $default = null)
110 * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
114 * public function set(string $key, mixed $value, null|int|\DateInterval $ttl = null): bool;
117 * @param string $key The key of the item to store.
126 * MUST be thrown if the $key string is not a legal value.
128 public function set_data(string $key, array $value, ?int $ttl = null): bool
141 * Delete an item from the cache by its unique key.
145 * public function delete(string $key): bool;
148 * @param string $key The unique cache key of the item to delete.
153 * MUST be thrown if the $key string is not a legal value.
155 public function delete_data(string $key): bool