When you cache a template, it is important to specify a "cache id". A "cache id" is an identifier that is specific to a specific page. It makes it easy to associate templates in order to keep track of where they are in the filesystem for caching.
For instance, you can put all pages for your gallery under the "gallery" group. Then when you need to clear all the pages for the gallery, you can simply call
$tpl->clear_cache("gallery"). Or to clear the cache for all gallery pictures, you can call
Cache ids are specified like this:
PHP ============================= $tpl->display("page.tpl", "compileid"); $tpl->display("page.tpl", "cacheid"); $tpl->display("page.tpl", "cacheid|subgroup");This allows you to load up
page.tpland assign it different names. One time you might load it and refer to it as "page1" and the next time call it "page2".