3 namespace Friendica\Core\Cache;
\r
5 use Friendica\Core\Cache;
\r
8 * Cache Driver Interface
\r
10 * @author Hypolite Petovan <mrpetovan@gmail.com>
\r
12 interface ICacheDriver
\r
15 * Fetches cached data according to the key
\r
17 * @param string $key The key to the cached data
\r
19 * @return mixed Cached $value or "null" if not found
\r
21 public function get($key);
\r
24 * Stores data in the cache identified by the key. The input $value can have multiple formats.
\r
26 * @param string $key The cache key
\r
27 * @param mixed $value The value to store
\r
28 * @param integer $duration The cache lifespan, must be one of the Cache constants
\r
32 public function set($key, $value, $duration = Cache::MONTH);
\r
36 * Delete a key from the cache
\r
38 * @param string $key
\r
42 public function delete($key);
\r
45 * Remove outdated data from the cache
\r
49 public function clear();
\r