|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Eindbaas Smarty Rookie
Joined: 16 Apr 2007 Posts: 28
|
Posted: Fri May 18, 2007 12:08 am Post subject: cache_lifetime and is_cached ? |
|
|
How does the is_cached-function work with cache_lifetime (and caching set to mode 2)?
Will a template be considered as being cached (return true) when there is a cachefile for it, but the lifetime for that particular template has expired? I'm getting some strange results with my code here, and i'm a little uncertain of what is going on exactly. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Fri May 18, 2007 2:20 pm Post subject: |
|
|
if cache mode is set to 2, then anytime you call $smarty->display() or $smarty->fetch() and a new cache is generated, the cache_lifetime (if set) will be respected for that particular display call. is_cached() will respect the lifetime value if the cached file has one. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|