mirror of
https://github.com/friendica/friendica
synced 2025-04-25 21:10:11 +00:00
Bugfixings for getAllKeys()
This commit is contained in:
parent
8491f8660f
commit
7da6da6666
5 changed files with 8 additions and 7 deletions
|
@ -21,18 +21,18 @@ class DatabaseCacheDriver extends AbstractCacheDriver implements ICacheDriver
|
|||
if (empty($prefix)) {
|
||||
$where = ['`expires` >= ?', DateTimeFormat::utcNow()];
|
||||
} else {
|
||||
$where = ['`expires` >= ? AND k LIKE CONCAT(?, \'%\')', DateTimeFormat::utcNow(), $prefix];
|
||||
$where = ['`expires` >= ? AND `k` LIKE CONCAT(?, \'%\')', DateTimeFormat::utcNow(), $prefix];
|
||||
}
|
||||
|
||||
$stmt = DBA::select('cache', ['k'], $where);
|
||||
|
||||
$list = [];
|
||||
$keys = [];
|
||||
while ($key = DBA::fetch($stmt)) {
|
||||
array_push($list, $key['k']);
|
||||
array_push($keys, $key['k']);
|
||||
}
|
||||
DBA::close($stmt);
|
||||
|
||||
return $list;
|
||||
return $keys;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue