From babeb575eb88d41028a2cb1e892d39f20cbbd570 Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Sat, 31 Dec 2011 02:29:28 +0000 Subject: [PATCH] Serialise output before caching --- source/lib/DownloadDispatcher/Source/PluginBase.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/lib/DownloadDispatcher/Source/PluginBase.class.php b/source/lib/DownloadDispatcher/Source/PluginBase.class.php index 6252eb8..47360ca 100644 --- a/source/lib/DownloadDispatcher/Source/PluginBase.class.php +++ b/source/lib/DownloadDispatcher/Source/PluginBase.class.php @@ -15,7 +15,7 @@ class DownloadDispatcher_Source_PluginBase extends DownloadDispatcher_PluginBase if (is_null(static::$source_cache)) { try { - static::$source_cache = static::$cache->fetch(static::$source_cache_file, static::$cache_lifetime); + static::$source_cache = unserialize(static::$cache->fetch(static::$source_cache_file, static::$cache_lifetime)); } catch (SihnonFramework_Exception_CacheObjectNotFound $e) { static::$source_cache = array(); } @@ -33,7 +33,7 @@ class DownloadDispatcher_Source_PluginBase extends DownloadDispatcher_PluginBase static::$source_cache[get_called_class()][] = $file; } - static::$cache->store(static::$source_cache_file, static::$source_cache); + static::$cache->store(static::$source_cache_file, serialize(static::$source_cache)); } protected function checkProcessed($file) {