Bug in the caching system
| From: | loic | Date: | Thu, 11 Apr 2002 20:24:01 +0000 |
| Subject: | Bug in the caching system | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-3647@lists.php.net to get a copy of this message | ||
Hi everybody,
I'm new here... I'm using smarty 2 after a big use of smarty 1.4
I have found a little bug in the way to refresh the cache in smarty 2.
Here is the diff file to apply to smarty.class.php 2.0.1
You can see that to refresh the cache the lifetime must be minus !
=> $this->cache_lifetime < 0
5 hours to try to debug, and at the end I decided to find the bug not in my script but in smarty.
Whatever, smarty is really a great template system !
bye
loic d'anterroches
--- start of diff file ----
1409c1409,1410
< if ($this->cache_lifetime < 0 && (time() - $this->_cache_info['timestamp'] > $this->cache_lifetime)) {
---
// if ($this->cache_lifetime < 0 && (time() - $this->_cache_info['timestamp'] > $this->cache_lifetime)) {
if ($this->cache_lifetime > 0 && (time() - $this->_cache_info['timestamp'] > $this->cache_lifetime)) {