3 namespace Friendica\Core\Cache;
8 * @author Hypolite Petovan <hypolite@mrpetovan.com>
13 * Lists all cache keys
15 * @param string prefix optional a prefix to search
17 * @return array Empty if it isn't supported by the cache driver
19 public function getAllKeys($prefix = null);
22 * Fetches cached data according to the key
24 * @param string $key The key to the cached data
26 * @return mixed Cached $value or "null" if not found
28 public function get($key);
31 * Stores data in the cache identified by the key. The input $value can have multiple formats.
33 * @param string $key The cache key
34 * @param mixed $value The value to store
35 * @param integer $ttl The cache lifespan, must be one of the Cache constants
39 public function set($key, $value, $ttl = Cache::FIVE_MINUTES);
42 * Delete a key from the cache
44 * @param string $key The cache key
48 public function delete($key);
51 * Remove outdated data from the cache
52 * @param boolean $outdated just remove outdated values
56 public function clear($outdated = true);
59 * Returns the name of the current cache
63 public function getName();