Skip to content

Commit 194fd5b

Browse files
committed
Merge pull request #44 from emisaacson/fix-memoize
Save result in memory when successfully pulled from database
2 parents b01f86b + d394383 commit 194fd5b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Util/Module.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ protected static function memoize($method_name) {
5959
return $data;
6060
}
6161
if ($cache = cache_get($cache_name)) {
62-
return $cache->data;
62+
$data = $cache->data;
63+
return $data;
6364
}
6465
$data = call_user_func_array(array(get_called_class(), $method_name), array());
6566
cache_set($cache_name, $data);

0 commit comments

Comments
 (0)