[prev in list] [next in list] [prev in thread] [next in thread]
List: smarty-dev
Subject: [SMARTY-DEV] cache lifetime bug
From: Andreas Kossmeier <andreas.kossmeier () bergfex ! at>
Date: 2002-04-08 10:44:52
[Download RAW message or body]
hi,
#1 cache_lifetime bug
there is a bug in cache_lifetime handling in function _read_cache_file:
cache will never get expired, if a cache_lifetime > 0 is set:
: if ($this->cache_lifetime < 0 &&
: (time()- $this->_cache_info['timestamp'] > $this->cache_lifetime))
should be
: if ($this->cache_lifetime < 0 ||
: (time()- $this->_cache_info['timestamp'] > $this->cache_lifetime))
the bug was introduced in Smarty 2.0
#2 cache_lifetime values and documentation
i know cache handling for cache_lifetime = 0 has changed several times
in the past currently the comment near the variable definition is:
// number of seconds cached content will persist.
// 0 = never expires. default is one hour (3600)
IMO the definition of a cache_lifetime *has* to be:
1. > 0 caching for the appropriate lifetime
2. = 0 no caching
3. < 0 never expire (usually cache_lifetime = -1)
andreas
--
andreas kossmeier
bergfex.at - http://www.bergfex.at
--
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic