1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-12-18 02:16:03 +01:00

don't cache stuff for mods, or the post controls will go away

This commit is contained in:
Savetheinternet 2011-05-20 15:39:20 +10:00
parent edd93c5652
commit e9a6b3fa58

View File

@ -602,7 +602,7 @@
while($th = $query->fetch()) { while($th = $query->fetch()) {
$thread = new Thread($th['id'], $th['subject'], $th['email'], $th['name'], $th['trip'], $th['capcode'], $th['body'], $th['time'], $th['thumb'], $th['thumbwidth'], $th['thumbheight'], $th['file'], $th['filewidth'], $th['fileheight'], $th['filesize'], $th['filename'], $th['ip'], $th['sticky'], $th['locked'], $th['embed'], $mod ? '?/' : $config['root'], $mod); $thread = new Thread($th['id'], $th['subject'], $th['email'], $th['name'], $th['trip'], $th['capcode'], $th['body'], $th['time'], $th['thumb'], $th['thumbwidth'], $th['thumbheight'], $th['file'], $th['filewidth'], $th['fileheight'], $th['filesize'], $th['filename'], $th['ip'], $th['sticky'], $th['locked'], $th['embed'], $mod ? '?/' : $config['root'], $mod);
if($config['memcached']['enabled']) { if($config['memcached']['enabled'] && !$mod) {
if($built = $memcached->get("theadindex_{$th['id']}")) { if($built = $memcached->get("theadindex_{$th['id']}")) {
$body .= $built; $body .= $built;
continue; continue;
@ -638,7 +638,7 @@
$built = '<div id="thread_' . $thread->id . '">' . $thread->build(true) . '</div>'; $built = '<div id="thread_' . $thread->id . '">' . $thread->build(true) . '</div>';
if($config['memcached']['enabled']) { if($config['memcached']['enabled'] && !$mod) {
$memcached->set("theadindex_{$th['id']}", $built, time() + $config['memcached']['timeout']); $memcached->set("theadindex_{$th['id']}", $built, time() + $config['memcached']['timeout']);
} }