*
* @package Friendica\Core\Cache
*/
-class ArrayCache extends AbstractCacheDriver
+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)
*/
/**
* (@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;
}