diff options
author | Joe7 <jozsef.rnagy@site.hu> | 2010-12-27 14:03:11 +0100 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-12-28 23:14:04 -0800 |
commit | fda92507964b9521b632a97c9e343b4639a657f7 (patch) | |
tree | ddfac5c24fc49522172902809207f7b6f3f6ca00 /modules/gallery/libraries/drivers | |
parent | b42fcb9cda4dafdb9db86770f54965b3fb2fc7ab (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/gallery/libraries/drivers')
-rw-r--r-- | modules/gallery/libraries/drivers/Cache/Database.php | 1 |
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; } |