Browse Source

only cache if enabled

pull/40/head
Michael Save 12 years ago
parent
commit
cccbffc42f
  1. 3
      mod.php

3
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 {
@ -321,6 +321,7 @@
: sprintf($config['file_page'], $match[1])) .
'">$0</a>', $log['text']);
if($config['cache']['enabled'])
cache::set($log_id, $log['text']);
}
}

Loading…
Cancel
Save