Cache lifetime problem
| From: | Alain Fontaine | Date: | Sat, 01 Jun 2002 14:43:56 +0000 |
| Subject: | Cache lifetime problem | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-4493@lists.php.net to get a copy of this message | ||
Hello!
We are using Smarty 2.0.1 on a redhat linux 7.2 box. I have this code in one
of my files:
<-- snip -->
$Smarty->caching = false;
$Smarty->cache_dir = "/dhnet/html/euro2000/scoreboard/cache_scoreboard";
$Smarty->cache_lifetime = 25; // cache lifetime de 25 secondes
$Smarty->cache_modified_check = false;
.
.
.
if( !$Smarty->is_cached("screen.tpl", "scoreboard_" . $MatchID) )
{
// DB connections and stuff
}
.
.
.
$Smarty->Display("screen.tpl", "scoreboard_" . $MatchID);
<-- snip -->
The generation of the cache files works okay, as I can see them in the
cache_dir I have specified. However, they don't expire, i.e. they are never
updated and their modification time never changes, although I set the
lifetime to 25 seconds. Why is this so?
Thanks !
---
Alain Fontaine
VAlain sa