From cccbffc42fdb2b0f65a775efab6eee8a49f02a1a Mon Sep 17 00:00:00 2001 From: Michael Save Date: Mon, 9 Jan 2012 10:43:16 +1100 Subject: [PATCH] only cache if enabled --- mod.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mod.php b/mod.php index 5470ed87..2a2eec5b 100644 --- a/mod.php +++ b/mod.php @@ -298,7 +298,7 @@ while($log = $query->fetch()) { $log_id = 'log_' . md5($log['text']); - if($_log = cache::get($log_id)) + if($config['cache']['enabled'] && $_log = cache::get($log_id)) $log['text'] = $_log; else { @@ -320,8 +320,9 @@ sprintf($config['file_page'], $post['thread']) . '#' . $match[1] : sprintf($config['file_page'], $match[1])) . '">$0', $log['text']); - - cache::set($log_id, $log['text']); + + if($config['cache']['enabled']) + cache::set($log_id, $log['text']); } } }