3 namespace Friendica\Core\Cache;
8 * @author Hypolite Petovan <hypolite@mrpetovan.com>
12 const MONTH = 2592000;
16 const HALF_HOUR = 1800;
17 const QUARTER_HOUR = 900;
18 const FIVE_MINUTES = 300;
23 * Lists all cache keys
25 * @param string prefix optional a prefix to search
27 * @return array Empty if it isn't supported by the cache driver
29 public function getAllKeys($prefix = null);
32 * Fetches cached data according to the key
34 * @param string $key The key to the cached data
36 * @return mixed Cached $value or "null" if not found
38 public function get($key);
41 * Stores data in the cache identified by the key. The input $value can have multiple formats.
43 * @param string $key The cache key
44 * @param mixed $value The value to store
45 * @param integer $ttl The cache lifespan, must be one of the Cache constants
49 public function set($key, $value, $ttl = self::FIVE_MINUTES);
52 * Delete a key from the cache
54 * @param string $key The cache key
58 public function delete($key);
61 * Remove outdated data from the cache
62 * @param boolean $outdated just remove outdated values
66 public function clear($outdated = true);