Add ICacheDriver->getAllKeys method

This commit is contained in:
Hypolite Petovan 2018-09-25 22:52:32 -04:00
commit 71c08a044f
7 changed files with 86 additions and 0 deletions

View file

@ -13,6 +13,16 @@ use Friendica\Util\DateTimeFormat;
*/
class DatabaseCacheDriver extends AbstractCacheDriver implements ICacheDriver
{
/**
* (@inheritdoc)
*/
public function getAllKeys()
{
$stmt = DBA::select('cache', ['k'], ['`expires` >= ?', DateTimeFormat::utcNow()]);
return DBA::toArray($stmt);
}
/**
* (@inheritdoc)
*/