]> git.mxchange.org Git - friendica.git/commitdiff
Add missing Cache::delete method
authorHypolite Petovan <mrpetovan@gmail.com>
Sat, 17 Mar 2018 01:57:58 +0000 (21:57 -0400)
committerHypolite Petovan <mrpetovan@gmail.com>
Sat, 17 Mar 2018 01:57:58 +0000 (21:57 -0400)
src/Core/Cache.php

index 3f2edd2e20cefedafe4109194cf628ca096ed425..f1d1e11a542a26835b0700e25221fd36493ef044 100644 (file)
@@ -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
         *