Re: [SMARTY] getting correct Last-Modified date
| From: | Monte Ohrt | Date: | Fri, 26 Jul 2002 14:23:33 +0000 |
| Subject: | Re: [SMARTY] getting correct Last-Modified date | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5466@lists.php.net to get a copy of this message | ||
There are no functions available to get that, but after you fetch the template the information on the cache file is in the $_cache_info variable.
print_r($smarty->_cache_info);
Array
(
[template] => Array
(
[0] => index.tpl
)
[config] => Array
(
[0] => test.conf
)
[timestamp] => 1027693349
[expires] => 1027696949
)
Ivo Jansch wrote:
Hi, to optimally make use of the browser cache of my visitors, I want to send the correct Last-Modified header. When my template is rendered, this is no problem, since I have the date in the database. However, when the template is fetched from the cache, I don't know this date. What is the best way to retrieve this date, without manually getting around Smarty to get the cache-file timestamp? Greetings, Ivo-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.