Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

cache_lifetime and is_cached ?

 
Post new topic   Reply to topic    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
Eindbaas
Smarty Rookie


Joined: 16 Apr 2007
Posts: 28

PostPosted: Fri May 18, 2007 12:08 am    Post subject: cache_lifetime and is_cached ? Reply with quote

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
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Fri May 18, 2007 2:20 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP