X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FCore%2FCache%2FArrayCache.php;h=a99b05788f64e75e46d5d8e4df8c230bdcf6c414;hb=ef0545645a3054a6433340e7ac170c1933e670cc;hp=b1982871487c241830dea1d70e5eb6a0750cd2ac;hpb=80a4e6263fd53f83a710d2a2e6c57baae38cb14b;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; }