RE: [SMARTY] Deleting a specific cache id from a different smarty instance
| From: | Hoffman, Geoffrey | Date: | Thu, 23 Jan 2003 15:16:22 +0000 |
| Subject: | RE: [SMARTY] Deleting a specific cache id from a different smarty instance | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-7309@lists.php.net to get a copy of this message | ||
Just for the record, Thanks Messju,
your suggestion worked like a champ.
It only took four lines of code:
$id = $theOneToTrash;
require("../smarty_myapp.class.php");
$smtemp = new smarty_myapp();
$smtemp->clear_cache('index.tpl', $id);
For what it's worth, I actually lied - my admin app is a
fusebox app and the display app is a Smarty app, but
the PHP parser doesn't care! ;)
Geoff
MM> Maybe you could instanciate your $smarty_view_app inside your
MM> admin-pages
MM> and call $smarty_view_app->clear_cache() or whatever. it is
MM> totally legal
MM> to have more than one instance of smarty in a php-script.
GH> I'm wondering if there's an easy way to clear a cache id at database
update
GH> time instead.