Re: [SMARTY] Deleting a specific cache id from a different smarty instance

From: Date: Wed, 22 Jan 2003 08:25:29 +0000
Subject: Re: [SMARTY] Deleting a specific cache id from a different smarty instance
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-7290@lists.php.net to get a copy of this message
Hello, On Tue, Jan 21, 2003 at 06:28:41PM -0700, Hoffman, Geoffrey wrote: > I found > > // clear the cache for a particular cache id in an multiple-cache template > $smarty->clear_cache("index.tpl","CACHEID"); > > on the docs, but it appears that this is meant to be used at view-time, e.g. > right before a 'display' is called. > > I'm wondering if there's an easy way to clear a cache id at database update > time instead. > > The admin app I'm building will have a completely different instance of > $smarty (technically, a $smarty_admin_app based on extending the smarty > class), so it has different paths than the instance of $smarty_view_app)... > I need to have the $smarty_admin_app trash a cacheid from the > $smarty_view_app ... seems like I may have to roll my own PHP handler to do > it, but was hoping to avoid that. Maybe you could instanciate your $smarty_view_app inside your admin-pages and call $smarty_view_app->clear_cache() or whatever. it is totally legal to have more than one instance of smarty in a php-script. just an idea messju > Any suggestions would be most helpful. > > Regards- > Geoff > > By the way, now that I've been using smarty for a while, it becomes more > apparent with each hour I save what an awesome achievement it is. > Rock on Monte! > > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

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