RE: [SMARTY] Cache lifetime problem
| From: | Alain Fontaine | Date: | Sun, 02 Jun 2002 21:19:17 +0000 |
| Subject: | RE: [SMARTY] Cache lifetime problem | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-4503@lists.php.net to get a copy of this message | ||
Hello,
Has anyone some idea concerning my problem below? It's pretty urgent, as we
expect a lot of visitors tomorrow and on Tuesday on our worldcup 2002 site,
so any performance gain is appreciated.
Thanks for your ideas...
<-- see below -->
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 = true;
$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
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php