You are here: Re: [SMARTY] Storing variables in the cache « Smarty Templates Posts « IT news, forums, messages
Re: [SMARTY] Storing variables in the cache

Posted by Ivo Jansch on 08/29/05 18:57

-----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 <ivo@ibuildings.nl>
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-----

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация