Re: [SMARTY] Storing variables in the cache
Ivo Jansch <[email protected]>
| Newsgroups | gmane.comp.php.smarty.general |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
boots wrote:
> Hi Ivo. I'm not exactly sure what you mean by this. Perhaps you are
> thinking about cache_attrs on plugins?
No, what I mean is something like this:
if ($smarty->is_cached("test.tpl"))
{
$last_modified = $smarty->getVariable("test.tpl", "last_modified");
)
else
{
$last_modified = doSomeComplexStuffToDetermineLastModificationDate();
$smarty->setVariable("last_modified", $last_modified);
}
$smarty->render("test.tpl");
echo "Last modification = ".$last_modified;
In other words, I not only want to store the template output in the
cache, but also some meta data along with it.
Greetings,
Ivo
- --
Ivo Jansch <[email protected]>
ibuildings.nl BV - information technology
http://www.ibuildings.nl
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDEzB595NUnGFZm9cRAoZWAJ417qcAQvrr5OayQ5688LFHrrWOGwCg69xL
NCbQRLHcF0rPo2NVZH+eORE=
=uImj
-----END PGP SIGNATURE-----
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php