From 30d8c736602e8a0e485e71fbe4ac9b9f762065bb Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 16 Mar 2018 21:57:58 -0400 Subject: [PATCH] Add missing Cache::delete method --- src/Core/Cache.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/Core/Cache.php b/src/Core/Cache.php index 3f2edd2e2..f1d1e11a5 100644 --- a/src/Core/Cache.php +++ b/src/Core/Cache.php @@ -99,6 +99,24 @@ class Cache extends \Friendica\BaseObject return $return; } + /** + * @brief Delete a value from the cache + * + * @param string $key The key to the cached data + * + * @return bool + */ + public static function delete($key) + { + $time = microtime(true); + + $return = self::getDriver()->delete($key); + + self::getApp()->save_timestamp($time, 'cache_write'); + + return $return; + } + /** * @brief Remove outdated data from the cache *