]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Cache/ArrayCache.php
Merge pull request #7754 from annando/aria
[friendica.git] / src / Core / Cache / ArrayCache.php
index 47c9c166808b86b8b53b4bac601223ac2a3c00e3..c6f3983ee2586efed12aeed3a8db4d516ccef3f7 100644 (file)
@@ -2,17 +2,14 @@
 
 namespace Friendica\Core\Cache;
 
-
-use Friendica\Core\Cache;
-
 /**
- * Implementation of the IMemoryCacheDriver mainly for testing purpose
+ * Implementation of the IMemoryCache mainly for testing purpose
  *
  * Class ArrayCache
  *
  * @package Friendica\Core\Cache
  */
-class ArrayCache extends AbstractCacheDriver implements IMemoryCacheDriver
+class ArrayCache extends Cache implements IMemoryCache
 {
        use TraitCompareDelete;
 
@@ -22,9 +19,9 @@ class ArrayCache extends AbstractCacheDriver implements IMemoryCacheDriver
        /**
         * (@inheritdoc)
         */
-       public function getAllKeys()
+       public function getAllKeys($prefix = null)
        {
-               return array_keys($this->cachedData);
+               return $this->filterArrayKeysByPrefix(array_keys($this->cachedData), $prefix);
        }
 
        /**
@@ -93,4 +90,12 @@ class ArrayCache extends AbstractCacheDriver implements IMemoryCacheDriver
                        return false;
                }
        }
+
+       /**
+        * {@inheritDoc}
+        */
+       public function getName()
+       {
+               return self::TYPE_ARRAY;
+       }
 }