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:
Joe7
2010-12-27 14:03:11 +01:00
parent d0e78fc5cf
commit a4100521d7
@@ -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;
}