Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
return self::workDir() . '/cache_' . $this->name . '.tpl';
}
+ /** Remove the cache for the current page.
+ */
+ public function removePageCache()
+ {
+ @unlink($this->cacheFilename());
+ global $globals;
+ $page = glob($globals->spoolroot . '/spool/templates_c/*cache_' . $this->name . '.tpl.php');
+ if (count($page) > 0) {
+ @unlink($page[0]);
+ }
+ }
+
/** Fetch the content of the wiki page.
*/
private function fetchContent()
$cache_exists = file_exists($wiki_cache);
if (Env::v('action') || !$cache_exists) {
if ($cache_exists && !$feed) {
- unlink($wiki_cache);
+ $wp->removePageCache();
+ $cache_exists = false;
}
// we leave pmwiki do whatever it wants and store everything