X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FCache%2FArrayCache.php;h=01157f7f8dbd3e7167c688d30ee41f08c8c47fa3;hb=aa0b485f3dca72c5448076e913fa54d948cd7731;hp=c6f3983ee2586efed12aeed3a8db4d516ccef3f7;hpb=f1e7d97b8cae93e1c77f5a5085880409b01fcdbe;p=friendica.git diff --git a/src/Core/Cache/ArrayCache.php b/src/Core/Cache/ArrayCache.php index c6f3983ee2..01157f7f8d 100644 --- a/src/Core/Cache/ArrayCache.php +++ b/src/Core/Cache/ArrayCache.php @@ -1,15 +1,32 @@ . + * + */ namespace Friendica\Core\Cache; +use Friendica\Core\BaseCache; + /** * Implementation of the IMemoryCache mainly for testing purpose - * - * Class ArrayCache - * - * @package Friendica\Core\Cache */ -class ArrayCache extends Cache implements IMemoryCache +class ArrayCache extends BaseCache implements IMemoryCache { use TraitCompareDelete; @@ -38,7 +55,7 @@ class ArrayCache extends Cache implements IMemoryCache /** * (@inheritdoc) */ - public function set($key, $value, $ttl = Cache::FIVE_MINUTES) + public function set($key, $value, $ttl = Duration::FIVE_MINUTES) { $this->cachedData[$key] = $value; return true; @@ -70,7 +87,7 @@ class ArrayCache extends Cache implements IMemoryCache /** * (@inheritdoc) */ - public function add($key, $value, $ttl = Cache::FIVE_MINUTES) + public function add($key, $value, $ttl = Duration::FIVE_MINUTES) { if (isset($this->cachedData[$key])) { return false; @@ -82,7 +99,7 @@ class ArrayCache extends Cache implements IMemoryCache /** * (@inheritdoc) */ - public function compareSet($key, $oldValue, $newValue, $ttl = Cache::FIVE_MINUTES) + public function compareSet($key, $oldValue, $newValue, $ttl = Duration::FIVE_MINUTES) { if ($this->get($key) === $oldValue) { return $this->set($key, $newValue); @@ -96,6 +113,6 @@ class ArrayCache extends Cache implements IMemoryCache */ public function getName() { - return self::TYPE_ARRAY; + return Type::ARRAY; } }