mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-04 14:11:01 -04:00
Added limit on select as for the outcome it doesn't matter if there are 20 rows or just 1. Is sufficient to return straight after reading 1 row.
This commit is contained in:
@@ -34,6 +34,7 @@ class Cache_Database_Driver extends Cache_Driver {
|
||||
$count = db::build()
|
||||
->where("key", "=", $id)
|
||||
->where("expiration", ">=", time())
|
||||
->limit("1")
|
||||
->count_records("caches");
|
||||
return $count > 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user