summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe7 <jozsef.rnagy@site.hu>2010-12-27 14:03:11 +0100
committerJoe7 <jozsef.rnagy@site.hu>2010-12-27 14:03:11 +0100
commita4100521d7a60a31e2f0c22d12fc0e371c201f8c (patch)
tree70167ffe200c6dd77b643058ac11296cba108f5a
parentd0e78fc5cf5671d69bd815dd1aff9041616be3f2 (diff)
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.
-rw-r--r--modules/gallery/libraries/drivers/Cache/Database.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/gallery/libraries/drivers/Cache/Database.php b/modules/gallery/libraries/drivers/Cache/Database.php
index b7822811..4f57b3da 100644
--- a/modules/gallery/libraries/drivers/Cache/Database.php
+++ b/modules/gallery/libraries/drivers/Cache/Database.php
@@ -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;
}