Commit 0be97d9a authored by Bate's avatar Bate

Planning2

parent 8f61b6ad
......@@ -55,6 +55,7 @@ class cachedcontents extends stdcontents
$this->title = $contents->title;
$this->buffer = "<!-- C".date ("d/m/Y H:i:s")." -->".$contents->html_render();
if($contents->is_cachable())
$this->redis->set ($this->uid, $this->title."\n".$this->buffer);
return $this;
}
......
......@@ -80,6 +80,11 @@ class stdcontents
return $this->buffer;
}
function is_cachable()
{
return true;
}
}
/** Conteneur de conteneurs, titre et paragraphes
......@@ -213,11 +218,19 @@ class wikicontents extends contents
function html_render()
{
if ( $this->buffer && (preg_match("/pl2_multi/i",$this->buffer) === 0) )
if ( $this->buffer )
return $this->buffer;
return $this->buffer = doku2xhtml($this->contents);
}
function is_cachable()
{
if ( $this->buffer && (preg_match("/pl2_multi/i",$this->buffer) === 0) )
return true;
else
return false;
}
}
/** Conteneur de l'aide du texte structuré
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment