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 )