summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorJoe7 <jozsef.rnagy@site.hu>2010-12-27 14:03:11 +0100
committerBharat Mediratta <bharat@menalto.com>2010-12-28 23:14:04 -0800
commitfda92507964b9521b632a97c9e343b4639a657f7 (patch)
treeddfac5c24fc49522172902809207f7b6f3f6ca00 /modules
parentb42fcb9cda4dafdb9db86770f54965b3fb2fc7ab (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.
Diffstat (limited to 'modules')
-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;
}