X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FCore%2FCache%2FArrayCache.php;h=a99b05788f64e75e46d5d8e4df8c230bdcf6c414;hb=fa1f48e1711c64d42ddb0f72c7670fa28f56482d;hp=b1982871487c241830dea1d70e5eb6a0750cd2ac;hpb=5f1b5f82ad6d9b816db5c99ff708f706dc39f0bb;p=friendica.git diff --git a/src/Core/Cache/ArrayCache.php b/src/Core/Cache/ArrayCache.php index b198287148..a99b05788f 100644 --- a/src/Core/Cache/ArrayCache.php +++ b/src/Core/Cache/ArrayCache.php @@ -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; }