RE: [Zope-dev] AW: Caching prob with AHCM and headers

2003-09-13 Thread Dieter Maurer
Bjorn Stabell wrote at 2003-9-11 09:59 +0800:
 > ...
 > I know, I was just trying to figure out how this was supposed to work.
 > Currently setting Last-Modified seems to be the only way to get
 > something cached in Apache; Expires alone is no good, and adding an Etag
 > header doesn't seem to have any effect either.  Maybe this should be
 > classified as an Apache problem?  Shouldn't Apache cache pages that have
 > Expires?

It would violate the HTTP 1.1 specification:

  The spec states that any cachable page must have either an
  "ETag" or "Last-Modified" header (beside any cache control
  header/s).


Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] AW: Caching prob with AHCM and headers

2003-09-10 Thread Janko Hauser
On Thu, 11 Sep 2003 09:59:22 +0800
"Bjorn Stabell" <[EMAIL PROTECTED]> wrote:

> 
> Setting Last-Modified to the current time isn't always the right
> thing; some objects, .e.g., Files, Images, Documents, have last
> modification times, and using those would be better.  Not sure if
> the accelerator can be smart enough to know about these, though.
> 

I think, this is one problem with the current code. There is no
defined way to decide, when something is last modified. With CMF-based
sites there is a clearly defined property for this. On the other hand
all objects have at least a bobobase_modification_time, but this one
changes with every ZODB action on the object.

I'm not sure what to do.

__Janko



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] AW: Caching prob with AHCM and headers

2003-09-10 Thread Jens Vagelpohl
I know, I was just trying to figure out how this was supposed to work.
Currently setting Last-Modified seems to be the only way to get
something cached in Apache; Expires alone is no good, and adding an 
Etag
header doesn't seem to have any effect either.  Maybe this should be
classified as an Apache problem?  Shouldn't Apache cache pages that 
have
Expires?
Please keep in mind that **Apache is not a cache server**, it has 
caching attached more like an afterthought to the mod_proxy. If you 
want predictable caching you will need to use real caching software 
such as Squid.

I personally have moved away from Apache even for small websites since 
there are some other issues with Apache caching, such as zero-length 
responses in some cases.

jens

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


RE: [Zope-dev] AW: Caching prob with AHCM and headers

2003-09-10 Thread Bjorn Stabell
Carsten wrote:
> Well, sadly I didn't find the time to pursue the issue any 
> further yet. We're kneedeep in work to get the system up and 
> running and caching isn't top priority so far. I don't even 
> know if someone patched the AHCM yet, simply haven't looked.
> 
> But as someone suggested somewhere and you can see in 
> http://mail.zope.org/pipermail/zope/2003-April/135101.html it 
> works if you set the headers yourself. So if you need caching 
> _now_ and AHCM is not fixed yet, change the object used so 
> that it sets the headers correctly itself.
> 
> I know that this solution is ikky but I don't know when I 
> will have time to tackle the issue of a comfortable cache 
> system. Though I know I will have to solve it sometime :)

I know, I was just trying to figure out how this was supposed to work.
Currently setting Last-Modified seems to be the only way to get
something cached in Apache; Expires alone is no good, and adding an Etag
header doesn't seem to have any effect either.  Maybe this should be
classified as an Apache problem?  Shouldn't Apache cache pages that have
Expires?

Setting Last-Modified to the current time isn't always the right thing;
some objects, .e.g., Files, Images, Documents, have last modification
times, and using those would be better.  Not sure if the accelerator can
be smart enough to know about these, though.

Bye,
-- 
Bjorn

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] AW: Caching prob with AHCM and headers

2003-09-10 Thread Germer, Carsten
Well, sadly I didn't find the time to pursue the issue any further yet.
We're kneedeep in work to get the system up and running and caching isn't
top priority so far.
I don't even know if someone patched the AHCM yet, simply haven't looked.

But as someone suggested somewhere and you can see in
http://mail.zope.org/pipermail/zope/2003-April/135101.html it works if you
set the headers yourself.
So if you need caching _now_ and AHCM is not fixed yet, change the object
used so that it sets the headers correctly itself.

I know that this solution is ikky but I don't know when I will have time to
tackle the issue of a comfortable cache system. Though I know I will have to
solve it sometime :)

/Carsten

> -Ursprüngliche Nachricht-
> Von: Bjorn Stabell [mailto:[EMAIL PROTECTED]
> Gesendet: Mittwoch, 10. September 2003 13:07
> An: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Betreff: Re: Caching prob with AHCM and headers
> 
> 
> Accelerated HTTP Caching Manager doesn't work out-of-the-box as this
> thread reported, but the thread had no conclusion:
> 
> http://mail.zope.org/pipermail/zope/2003-April/134800.html
> http://mail.zope.org/pipermail/zope/2003-April/135059.html
> http://mail.zope.org/pipermail/zope/2003-April/135101.html
> 
> I'm running into the same problem now, also with Apache as the caching
> reverse proxy, so I was wondering if there was any progress?  Here are
> some of my thoughts;
> 
> It seems reasonable that without a Last-Modified or Etag header in the
> response, that a client (and surrogate/ http accelerator) 
> will not have
> any validators (e.g., If-Modified-Since or If-Match corresponding to
> last modified and etag headers, respectively) in the request headers.
> 
> It's probably right that dynamic code doesn't return a Last-Modified
> header; instead, the RFC includes an Etag header, which is hash of the
> content, which is much easier to use for dynamic code.  The 
> Etag header
> returned by Zope, however, looks very suspicous; it is empty.  This
> could perhaps be fooling the caching machinery?
> 
> Perhaps the Etag header should just always be a hash of the content?
> (Another system worth looking at: http://www.jpcache.com/)
> 
> Bye,
> -- 
> Bjorn
> 

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )