X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FCache%2FArrayCache.php;h=47c9c166808b86b8b53b4bac601223ac2a3c00e3;hb=be7bd106784ad4e45833b1649e8409ef48f0d19f;hp=71610c39dfab80e90aefdb96341ca49751d57db3;hpb=3be013361eea0f20b6e3a0c5282622b514befb26;p=friendica.git diff --git a/src/Core/Cache/ArrayCache.php b/src/Core/Cache/ArrayCache.php index 71610c39df..47c9c16680 100644 --- a/src/Core/Cache/ArrayCache.php +++ b/src/Core/Cache/ArrayCache.php @@ -12,13 +12,21 @@ use Friendica\Core\Cache; * * @package Friendica\Core\Cache */ -class ArrayCache implements IMemoryCacheDriver +class ArrayCache extends AbstractCacheDriver implements IMemoryCacheDriver { use TraitCompareDelete; /** @var array Array with the cached data */ protected $cachedData = array(); + /** + * (@inheritdoc) + */ + public function getAllKeys() + { + return array_keys($this->cachedData); + } + /** * (@inheritdoc) */ @@ -51,8 +59,13 @@ class ArrayCache implements IMemoryCacheDriver /** * (@inheritdoc) */ - public function clear() + public function clear($outdated = true) { + // Array doesn't support TTL so just don't delete something + if ($outdated) { + return true; + } + $this->cachedData = []; return true; }