Ticket #1620 (new defect)

Opened 13 years ago

Last modified 9 years ago

Missing http headers -> cache not functioning properly

Reported by: sfermigier Owned by: fguillaume
Priority: P1 Milestone: CPS 3.5.7
Component: CPS (global) Version: 3.4.0
Severity: normal Keywords:
Cc:

Description

A proxy cache in front of Zope relies on the application providing explicit Last-Modified, Expires and Cache-Control headers.

This is currently not activated by default. In fact, Last-Modified and Expires are provided by CPSPortlets, but only on the first request on a document or section. Ex:

fermigier@ubuntu:~/tmp$ wget -S http://localhost:8080/cps/sections/test
--12:36:38--  http://localhost:8080/cps/sections/test
           => `test'
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:8080... connected.
HTTP request sent, awaiting response...
  HTTP/1.0 200 OK
  Server: Zope/(Zope 2.9.2-, python 2.4.2, linux2) ZServer/1.1 CPS/3.4
  Date: Wed, 19 Apr 2006 12:36:39 GMT
  Content-Length: 17685
  Expires: Wed, 19 Apr 2006 12:36:39 GMT
  Last-Modified: Wed, 19 Apr 2006 12:36:39 GMT
  Connection: Keep-Alive
  Content-Type: text/html; charset=ISO-8859-15
Length: 17,685 (17K) [text/html]

100%[====================================>] 17,685        --.--K/s

12:36:39 (89.24 MB/s) - `test' saved [17685/17685]

fermigier@ubuntu:~/tmp$ wget -S http://localhost:8080/cps/sections/test
--12:36:42--  http://localhost:8080/cps/sections/test
           => `test.1'
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:8080... connected.
HTTP request sent, awaiting response...
  HTTP/1.0 200 OK
  Server: Zope/(Zope 2.9.2-, python 2.4.2, linux2) ZServer/1.1 CPS/3.4
  Date: Wed, 19 Apr 2006 12:36:43 GMT
  Content-Length: 17685
  Content-Type: text/html; charset=ISO-8859-15
  Connection: Keep-Alive
Length: 17,685 (17K) [text/html]

100%[====================================>] 17,685        --.--K/s

12:36:43 (95.83 MB/s) - `test.1' saved [17685/17685]

Change History

comment:1 Changed 13 years ago by sfermigier

  • Milestone changed from CPS 3.4.1 to CPS 3.4.2

comment:2 Changed 9 years ago by gracinet

  • Milestone changed from CPS 3.5.0 to CPS 3.5.1

See also #2050

comment:3 Changed 9 years ago by gracinet

Ah of course, the reason why that's on the first request must be that the header is set while rendering the portlet and not while displaying it from cache.

comment:4 Changed 9 years ago by gracinet

  • Milestone changed from CPS 3.5.1 to CPS 3.5.2

A good review on HTTP headers and caching is scheduled for CPS 3.5.2

Note: See TracTickets for help on using tickets.