Cache date and Etag
| From: | Mike Krus | Date: | Thu, 12 Dec 2002 14:21:55 +0000 |
| Subject: | Cache date and Etag | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-6764@lists.php.net to get a copy of this message | ||
Hi,
I think it's been asked before, but is there a way in Smarty
to get the date at which a cache was generated for a given
template?
Maybe IsCached() could return the unix timestamp of the cache
creation date (and 0 if the cache is no longer valid)?
What I'm trying to do is handle Etags and generate HTTP 304
headers for cached content as described here:
http://www.pocketsoap.com/weblog/stories/2002/05/19/bdgToEtags.html
So for a given version of the cache I could use the timestamp
to generate an Etag. If a client software sends me an
Etag I can generate a 304 header telling him the data has
not changed and it does not need to be reloaded again.
Mike
--
NewsIsFree http://www.newsisfree.com/