+ /**
+ * (@inheritdoc)
+ */
+ public function getAllKeys($prefix = null)
+ {
+ if (empty($prefix)) {
+ $where = ['`expires` >= ?', DateTimeFormat::utcNow()];
+ } else {
+ $where = ['`expires` >= ? AND `k` LIKE CONCAT(?, \'%\')', DateTimeFormat::utcNow(), $prefix];
+ }
+
+ $stmt = DBA::select('cache', ['k'], $where);
+
+ $keys = [];
+ while ($key = DBA::fetch($stmt)) {
+ array_push($keys, $key['k']);
+ }
+ DBA::close($stmt);
+
+ return $keys;
+ }
+
+ /**
+ * (@inheritdoc)
+ */