OOPS, correction for little bug (lifetime = -1)

From: Date: Sat, 13 Apr 2002 07:21:33 +0000
Subject: OOPS, correction for little bug (lifetime = -1)
References: 1 2 3 4 5 6 7  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-63@lists.php.net to get a copy of this message
"Norbert röcher" <norbert.roecher@t-online.de> schrieb: Clean hack: change 1 (insert on line 1417 of cvs-version): if ($this->cache_lifetime != -1){ // expiration set $this->_cache_info['expires'] = $this->_cache_info['timestamp'] + $this->cache_lifetime; } else { // cache will never expire $this->_cache_info['expires'] = -1; } change 2 (replace [new] lines 1489-1492 with this): if ($this->caching == 2 && isset ($this->_cache_info['expires'])){ // caching by expiration time if ($this->_cache_info['expires'] != -1 && (time() > $this->_cache_info['expires'])) { // cache expired, regenerate return false; } } else { // caching by lifetime if ($this->cache_lifetime != -1 && (time() - $this->_cache_info['timestamp'] > $this->cache_lifetime)) { // cache expired, regenerate return false; } } Sorry again. :-) Regards, Norbert

« previous php.smarty.dev (#63) next »