Deleting cache selectively

From: Date: Fri, 16 Nov 2001 22:01:32 +0000
Subject: Deleting cache selectively
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1930@lists.php.net to get a copy of this message
Hello, I'm building a site which is database based, and I'm using Smarty to generate the output and take advantge of its caching. The problem is related to some scripts of my site: I have program.php and category.php that do some queries and build the output through smarty. The content of the database can remain the same for a few days, so I'd like to set the cache's lifetime to 0 (never expire), and clear the caches affected by the changes from a script which updates the db. The problem is that I can determine the page/cacheid used by category.php but not by program.php, because program.php uses function calls like $tpl->display("program.tpl", $idprog) and I don't know in advance what the $idprog passed are. I don't want to clear all the cache, and I'm looking for a method to clear the cache produced only by program.php. I tried $tpl->clear_cache("program.tpl") but with no result. Thanks Francesco Cipriani

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