httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cristi <cri...@medialab.sissa.it>
Subject [users@httpd] apache ignores cached entries.
Date Fri, 10 Nov 2006 11:18:51 GMT
Hello all

I've set up apache 2.2.3 as a caching reverse proxy. Another
server behind my apache installation sends cachable responses.
My apache server caches all the appropriate responses, but it
doesn't use the cache entries for some of them even if they
are cached and fresh.

For those cache entries which are fresh but which are ignored
by apache a request (non conditional) is made back to the origin
server. Then apache receives the response, it caches the response
and the cycle repeats.

For those who want to express their opinion I send here the response
headers of two independent requests, each of them being sent to the
origin server and to the proxy. So there are 4 responses below.



1.1) The first request sent to the origin server.
-------------------------------------------------

(NOTE: This request is NOT cached if I send it to the proxy server)

cristi@griffo:~/dev/apache-httpd-2.2.3/i1/var/zope$ wget -S --delete-after 'http://localhost:9080/ulisse/portal_javascripts/Plone
Tableless/ploneScripts4205.js'
--12:01:36--  http://localhost:9080/ulisse/portal_javascripts/Plone%20Tableless/ploneScripts4205.js
            => `ploneScripts4205.js'
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:9080... connected.
HTTP request sent, awaiting response...
   HTTP/1.0 200 OK
   Server: Zope/(Zope 2.8.6-final, python 2.4.2, linux2) ZServer/1.1 Plone/Unknown
   Date: Fri, 10 Nov 2006 11:01:36 GMT
   Content-Length: 92138
   Accept-Ranges: bytes
   Expires: Fri, 17 Nov 2006 11:01:36 GMT
   Last-Modified: Fri, 10 Nov 2006 11:01:36 GMT
   Connection: Keep-Alive
   Cache-Control: max-age=604800
   Content-Type: application/x-javascript;charset=utf-8
Length: 92,138 (90K) [application/x-javascript]
Removing ploneScripts4205.js.



1.2) The first request sent to the proxy.
-------------------------------------------------------------------
(NOTE: The request was not cached)

cristi@griffo:~/dev/apache-httpd-2.2.3/i1/var/zope$ wget -S --delete-after 'http://localhost:9999/portal_javascripts/Plone
Tableless/ploneScripts4205.js'
--12:04:37--  http://localhost:9999/portal_javascripts/Plone%20Tableless/ploneScripts4205.js
            => `ploneScripts4205.js'
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:9999... connected.
HTTP request sent, awaiting response...
   HTTP/1.1 200 OK
   Date: Fri, 10 Nov 2006 11:04:37 GMT
   Server: Zope/(Zope 2.8.6-final, python 2.4.2, linux2) ZServer/1.1 Plone/Unknown
   Content-Length: 92131
   Accept-Ranges: bytes
   Expires: Fri, 17 Nov 2006 11:04:37 GMT
   Last-Modified: Fri, 10 Nov 2006 11:04:37 GMT
   Cache-Control: max-age=604800
   Content-Type: application/x-javascript;charset=utf-8
   Keep-Alive: timeout=5, max=100
   Connection: Keep-Alive
Length: 92,131 (90K) [application/x-javascript]
Removing ploneScripts4205.js.


2.1 The second request sent to the origin server
-------------------------------------------------

cristi@griffo:~/dev/apache-httpd-2.2.3/i1/var/zope$ date; wget -S --delete-after 'http://localhost:9080/ulisse/controluce';
date
Fri Nov 10 12:10:45 CET 2006
--12:10:45--  http://localhost:9080/ulisse/controluce
            => `controluce'
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:9080... connected.
HTTP request sent, awaiting response...
   HTTP/1.0 200 OK
   Server: Zope/(Zope 2.8.6-final, python 2.4.2, linux2) ZServer/1.1 Plone/Unknown
   Date: Fri, 10 Nov 2006 11:10:45 GMT
   Content-Length: 16181
   Content-Language: en
   Expires: Fri, 10 Nov 2006 12:10:45 GMT
   Last-Modified: Fri, 10 Nov 2006 11:10:45 GMT
   Connection: Keep-Alive
   Cache-Control: max-age=3600
   Content-Type: text/html;charset=utf-8
Length: 16,181 (16K) [text/html]
Removing controluce.


2.2 The second requeste sent to the proxy
-------------------------------------------------

(NOTE: the result is cached)
Fri Nov 10 12:11:09 CET 2006
--12:11:09--  http://localhost:9999/controluce
            => `controluce'
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:9999... connected.
HTTP request sent, awaiting response...
   HTTP/1.1 200 OK
   Date: Fri, 10 Nov 2006 11:11:09 GMT
   Server: Apache/2.2.3 (Unix)
   Last-Modified: Fri, 10 Nov 2006 11:07:39 GMT
   Content-Length: 15703
   Content-Language: en
   Expires: Fri, 10 Nov 2006 12:07:39 GMT
   Cache-Control: max-age=3600
   Age: 211
   Keep-Alive: timeout=5, max=100
   Connection: Keep-Alive
   Content-Type: text/html;charset=utf-8
Length: 15,703 (15K) [text/html]

12:11:09 (499.18 MB/s) - `controluce' saved [15703/15703]




here is also my apache configuration:
---------------------------------------


CacheEnable disk /
CacheRoot /home/cristi/dev/apache-httpd-2.2.3/i1/var/zope

# CacheSize 10000
# CacheGcInterval 2
CacheLastModifiedFactor 0.1
CacheDefaultExpire 1
CacheDirLength 2

ExpiresActive On
ExpiresByType image/gif A10
ExpiresByType image/png A10
ExpiresByType image/jpeg A10
ExpiresByType text/css A10
ExpiresByType text/javascript A10
ExpiresByType application/x-javascript A10
ExpiresByType text/html A10
ExpiresByType text/xml A10


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message