Clear cache for entire site

From: Date: Fri, 09 Apr 2004 16:26:49 +0000
Subject: Clear cache for entire site
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-11260@lists.php.net to get a copy of this message
Hello All, I am trying to find a way to clear the cache for an entire site via a link clients can click on after updating. I tried a previously suggested method: if ($_GET['cache']=="off") { $smarty->clear_cache("index.tpl",$cache_id); } but that will only apply to "index.tpl". I changed it to if ($_GET['cache']=="off") { $smarty->clear_all_cache(); } But that again only cleared it for one page. I would like to use groups, but I pass 2 variables in the header, so I chose to do: $smarty->display('thumbs.tpl.php', md5($_SERVER['REQUEST_URI'])); to get a cache id (another suggested method from here that worked out well). However, with the above cache id method, I don't believe I can set up proper cache groups. What I would like to do is set the included file that holds the new instance of $Smarty with template variables and cache variables set and use the above code: if ($_GET['cache']=="off") { $smarty->clear_all_cache(); } That way, the next hit to the site would clear all cache, however I am unsure how to pass this variable to the include file. Hope I was clear...any suggestions? Joe UpFront Technology

« previous php.smarty.general (#11260) next »