X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FCache%2FICacheDriver.php;h=9ddcf5ad1fe8d530c44bb6ca628e813d1b147fb2;hb=8dc5b04be7cd9cb2eb77ed9824815efe27369bee;hp=9ed622693cb8046b7720196b66099099c3b2c438;hpb=27d94023eef0263a3ce9750f79a73ac941a25304;p=friendica.git diff --git a/src/Core/Cache/ICacheDriver.php b/src/Core/Cache/ICacheDriver.php index 9ed622693c..9ddcf5ad1f 100644 --- a/src/Core/Cache/ICacheDriver.php +++ b/src/Core/Cache/ICacheDriver.php @@ -1,50 +1,50 @@ - - */ -interface ICacheDriver -{ - /** - * Fetches cached data according to the key - * - * @param string $key The key to the cached data - * - * @return mixed Cached $value or "null" if not found - */ - public function get($key); - - /** - * Stores data in the cache identified by the key. The input $value can have multiple formats. - * - * @param string $key The cache key - * @param mixed $value The value to store - * @param integer $duration The cache lifespan, must be one of the Cache constants - * - * @return bool - */ - public function set($key, $value, $duration = Cache::MONTH); - - - /** - * Delete a key from the cache - * - * @param string $key - * - * @return bool - */ - public function delete($key); - - /** - * Remove outdated data from the cache - * - * @return bool - */ - public function clear(); -} + + */ +interface ICacheDriver +{ + /** + * Fetches cached data according to the key + * + * @param string $key The key to the cached data + * + * @return mixed Cached $value or "null" if not found + */ + public function get($key); + + /** + * Stores data in the cache identified by the key. The input $value can have multiple formats. + * + * @param string $key The cache key + * @param mixed $value The value to store + * @param integer $ttl The cache lifespan, must be one of the Cache constants + * + * @return bool + */ + public function set($key, $value, $ttl = Cache::FIVE_MINUTES); + + /** + * Delete a key from the cache + * + * @param string $key The cache key + * + * @return bool + */ + public function delete($key); + + /** + * Remove outdated data from the cache + * @param boolean $outdated just remove outdated values + * + * @return bool + */ + public function clear($outdated = true); +}