Permalink
Browse files

Call execute() after upate() and insert().

  • Loading branch information...
1 parent e105d1f commit 7c9bd9e8e8c4d2e57c4f08f526e5464236fa90e3 @bharat bharat committed Nov 25, 2009
Showing with 6 additions and 3 deletions.
  1. +6 −3 modules/gallery/libraries/drivers/Cache/Database.php
@@ -64,11 +64,14 @@ public function set($items, $tags=null, $lifetime=null) {
$status = db::build()->update(
"caches",
array("tags" => $tags, "expiration" => $lifetime, "cache" => serialize($data)),
- array("key", "=", $id));
+ array("key", "=", $id))
+ ->execute();
} else {
$status = db::build()->insert(
"caches",
- array("key" => $id, "tags" => $tags, "expiration" => $lifetime, "cache" => serialize($data)));
+ array("key" => $id, "tags" => $tags,
+ "expiration" => $lifetime, "cache" => serialize($data)))
+ ->execute();
}
}
@@ -185,6 +188,6 @@ public function delete_expired() {
* Empty the cache
*/
public function delete_all() {
- db::build()->query("TRUNCATE {caches}");
+ db::build()->query("TRUNCATE {caches}")->execute();
}
}

0 comments on commit 7c9bd9e

Please sign in to comment.