summaryrefslogtreecommitdiff
path: root/inc/display.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/display.php')
-rw-r--r--inc/display.php17
1 files changed, 4 insertions, 13 deletions
diff --git a/inc/display.php b/inc/display.php
index 9b2fbe9c..fe33f4c1 100644
--- a/inc/display.php
+++ b/inc/display.php
@@ -372,26 +372,17 @@
}
public function build($index=false) {
- global $board, $config, $memcached, $debug;
-
- if(!$this->mod && $config['memcached']['enabled']) {
- if($built = $memcached->get($this->memcached_key($index))) {
- if($config['debug']) {
- $debug['memcached'][] = $this->memcached_key($index);
- }
- return $built;
- }
- }
+ global $board, $config, $debug;
$built = Element('post_thread.html', Array('config' => $config, 'board' => $board, 'post' => &$this, 'index' => $index));
- if(!$this->mod && $config['memcached']['enabled']) {
- $memcached->set($this->memcached_key($index), $built, time() + $config['memcached']['timeout']);
+ if(!$this->mod && $index && $config['cache']['enabled']) {
+ cache::set($this->cache_key($index), $built);
}
return $built;
}
- function memcached_key($index) {
+ function cache_key($index) {
global $board;
return 'thread_' . ($index ? 'index_' : '') . $board['uri'] . '_' . $this->id;