Philip Mak wrote:
> 
> On Wed, 12 Sep 2001, Joshua Chamas wrote:
> 
> > I think that the invalidate parameter is the Clear I suggest,
> > and that Clear could be used to effectively deal with the timestamp
> > issue, but the logic must exist outside the caching mechanism.
> 
> Wouldn't it be a bit complicated to setup this logic, though? I would have
> to create some persistent variable keyed by the filename and Query String
> that keeps track of when the file was last recreated.
> 
> The reason that I suggested a timestamp parameter (which means "regenerate
> the page if the cached copy is older than $timestamp") is that the
> Response->Include function would already have all the information it needs
> for this logic. It has the script filename, it has the key (e.g. query
> string), and it knows the timestamp of the cached file.
> 

I think I've got it... your timestamp parameter will be the LastModified key.

  $Response->Include( { LastModified => $timestamp }

This mimics the HTTP RFC for Last-Modified header, seen at:
 http://www.freesoft.org/CIE/RFC/1945/59.htm

but instead of the server telling the browser when it was last
modified, the developer/script is telling the include/cache when 
it was last modified.  The use is not quite the same, but I think it
captures the meaning well.  If the cached item is older than the
LastModified timestamp, the cache entry will be expired.

How is that?

--Josh

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to