]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Cache/ArrayCache.php
Log function
[friendica.git] / src / Core / Cache / ArrayCache.php
index b1982871487c241830dea1d70e5eb6a0750cd2ac..a99b05788f64e75e46d5d8e4df8c230bdcf6c414 100644 (file)
@@ -19,6 +19,14 @@ class ArrayCache extends AbstractCacheDriver implements IMemoryCacheDriver
        /** @var array Array with the cached data */
        protected $cachedData = array();
 
+       /**
+        * (@inheritdoc)
+        */
+       public function getAllKeys($prefix = null)
+       {
+               return $this->filterArrayKeysByPrefix($this->cachedData, $prefix);
+       }
+
        /**
         * (@inheritdoc)
         */
@@ -53,6 +61,11 @@ class ArrayCache extends AbstractCacheDriver implements IMemoryCacheDriver
         */
        public function clear($outdated = true)
        {
+               // Array doesn't support TTL so just don't delete something
+               if ($outdated) {
+                       return true;
+               }
+
                $this->cachedData = [];
                return true;
        }