diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-06-29 04:14:47 +0800 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-06-29 04:17:32 +0800 |
commit | 3d7daf58ed62d0a350ded25ab9bd30c63571807e (patch) | |
tree | 6ad823757326394651cc95e0add85dac9b41ef1f /modules/gallery/libraries/drivers/Cache/Database.php | |
parent | 1c44537097e01f50c6c2840d0020d6a2406e2878 (diff) |
Change the cache column of the caches table to a large blob. This fixes ticket #485 and gives us the extra adavantage of not having to serialize the data (as the database driver handles that for us)
Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
Diffstat (limited to 'modules/gallery/libraries/drivers/Cache/Database.php')
-rw-r--r-- | modules/gallery/libraries/drivers/Cache/Database.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/gallery/libraries/drivers/Cache/Database.php b/modules/gallery/libraries/drivers/Cache/Database.php index 70235e05..158f7b3a 100644 --- a/modules/gallery/libraries/drivers/Cache/Database.php +++ b/modules/gallery/libraries/drivers/Cache/Database.php @@ -68,7 +68,6 @@ class Cache_Database_Driver implements Cache_Driver { $lifetime += time(); } - $data = serialize($data); if ($this->exists($id)) { $status = $this->db->update("caches", array("tags" => $tags, "expiration" => $lifetime, "cache" => $data), array("id" => $id)); @@ -101,7 +100,7 @@ class Cache_Database_Driver implements Cache_Driver { foreach ($db_result as $row) { // Add each cache to the array - $result[$row->id] = unserialize($row->cache); + $result[$row->id] = $row->cache; } // Turn notices back on @@ -133,7 +132,7 @@ class Cache_Database_Driver implements Cache_Driver { $ER = error_reporting(~E_NOTICE); // Return the valid cache data - $data = unserialize($cache->cache); + $data = $cache->cache; // Turn notices back on error_reporting($ER); |