> -----Original Message-----
> From: Perrin Harkins [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 15, 2000 6:19 PM
> To: Geoffrey Young
> Cc: '[EMAIL PROTECTED]'
> Subject: Re: [RFC] Apache::Expires
> 
> 
> On Wed, 15 Nov 2000, Geoffrey Young wrote:
> > I was wondering if anyone has some experience with expire 
> headers for
> > dynamic documents - kinda like mod_expires but for dynamic stuff.
> 
> We do this, and let mod_proxy use our headers to control its cache and
> handle If-Modified requests.

I guess I was thinking about sans proxy...

> 
> Um, it's pretty easy:
> 
> my $last_mod = time;
> my $expires  = time + 360; # expires in one hour
> 
> $r->header_out('Expires'       => Apache::Util::ht_time($expires));
> $r->header_out('Last-Modified' => 
> Apache::Util::ht_time($last_modified));
> 
> Or did you have something different in mind?

maybe... I might not have my head in the right place, though...

it's the lack of a 304 that's bothering me (today :)

If I just put your lines into a handler I get this from netscape:
  If-Modified-Since => Thu, 16 Nov 2000 12:48:04 GMT; length=1150

but, since there is no modification time for the 'document' to compare to
locally, 
my headers out are:

  Expires => Thu, 16 Nov 2000 12:56:45 GMT
  Last-Modified => Thu, 16 Nov 2000 12:50:45 GMT

with status 200 since the document was (again) generated (with new headers).

whereas for static documents, I see:
  If-Modified-Since => Wed, 15 Nov 2000 14:45:13 GMT; length=2057

and a 304 out that contains:
  Last-Modified => Wed, 15 Nov 2000 14:45:13 GMT
  ETag => "20f73-809-3a12a179"


I guess what I am really after is intercepting the If-Modified-Since tag and
return a 304 prior to content generation - maybe in a fixup handler...  I
think it is the entity tag stuff that is starting to throw me, too...

make sense?  It's a new day (but before my coffee) so who knows...

thanks for the input

--Geoff



> 
> - Perrin
> 

Reply via email to