From d394383adfe159206a9b85894e0e97f46efa4612 Mon Sep 17 00:00:00 2001 From: Elliot Isaacson Date: Fri, 22 Jan 2016 10:20:58 -0500 Subject: [PATCH] Save result in memory when successfully pulled from database --- src/Util/Module.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Util/Module.php b/src/Util/Module.php index 3e79ebf..e50b51f 100644 --- a/src/Util/Module.php +++ b/src/Util/Module.php @@ -59,7 +59,8 @@ protected static function memoize($method_name) { return $data; } if ($cache = cache_get($cache_name)) { - return $cache->data; + $data = $cache->data; + return $data; } $data = call_user_func_array(array(get_called_class(), $method_name), array()); cache_set($cache_name, $data);