httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rocky Seelbach">
Subject [users@httpd] httpd-2.2.0 CacheDefaultExpire not honored?
Date Thu, 08 Dec 2005 18:55:04 GMT
Trying to prove a caching-proxy configuration.  With the server configured
as below cache headers are marked with the CacheMaxExpire value, not the
CacheDefaultExpire.  I'm making requests for static content (a jpg file)
on the caching-proxy server.  Meaning there is only my browser and the
server under test involved.

I don't think there is any other setting that would get in the way.  I've
been looking for the logic in the code, but set_cache_maxex and
set_cache_defex don't appear to be the right variable names to look for.

Thanks in advance.  Any help appreciated.

# Cache Configuration
<IfModule mod_cache.c>
  <IfModule mod_disk_cache.c>
    CacheNegotiatedDocs On
    CacheDefaultExpire 60
    CacheMaxExpire 120
    CacheRoot /usr/local/apache2/cache
    CacheEnable disk /
    CacheDirLevels 10
    CacheDirLength 1

I've been working with httpd 2.1.6-alpha through 2.2.0.  I think I saw
this behavior with 2.1.9-beta but wasn't focused on it and couldn't be
sure at the time.  Entirely possible I've done something to confuse the

Reading the 48 byte binary structure and text in the header file shows the
following (system names and URL edited) info after a request made after
the original cache entry had expired;

Binary data:

Format: 4
Status: 200
Offset: 64
Version: 0
Date: Thu, 08 Dec 2005 10:32:30 PST
Expire: Thu, 08 Dec 2005 10:34:30 PST
Request: Thu, 08 Dec 2005 10:32:30 PST
Response: Thu, 08 Dec 2005 10:32:31 PST


URL: http://httpd-2.2.0:80/US/EN/brman/graphics/a.jpg
Date: Thu, 08 Dec 2005 18:32:30 GMT
Server: Apache/2.2.0 (Unix)
ETag: "34e-2936e700"
Accept-Ranges: bytes
Content-Length: 846
Expires: Thu, 08 Dec 2005 18:34:30 GMT
Via: 1.1 httpd-2.2.0
Last-Modified: Fri, 05 Nov 1999 16:11:40 GMT
Content-Type: image/jpeg

Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/, application/,
application/msword, application/x-shockwave-flash, */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
CLR 1.0.3705)
Host: httpd-2.2.0
If-None-Match: "34e-2936e700"
If-Modified-Since: Fri, 05 Nov 1999 16:11:40 GMT
Max-Forwards: 10
Via: 1.1 httpd-2.2.0

Operating System: UnixWare 7.1.3


ServerRoot "/usr/local/apache2"

PidFile /tmp/

Listen 80

<IfModule !mpm_winnt_module>
<IfModule !mpm_netware_module>
User nobody
Group nobody

DocumentRoot "/home/htdocs"

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all

<Directory "/home/htdocs">
    Options MultiViews IncludesNOEXEC
    AllowOverride None
    Order allow,deny
    Allow from all
    <IfModule mod_deflate.c>
      SetOutputFilter DEFLATE
      SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|pdf)$ no-gzip dont-vary


<IfModule dir_module>
    DirectoryIndex index.htm index.html

<FilesMatch "^\.ht">
    Order allow,deny
    Deny from all

AccessFileName .htaccess

ErrorLog logs/error_log
LogLevel debug

<IfModule log_config_module>
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common

    <IfModule logio_module>
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-Agent}i\" %I %O" combinedio

    CustomLog logs/access_log common


<IfModule alias_module>
    ScriptAlias /cgi-bin/       "/home/htdocs/cgi-bin/"

DefaultType text/plain

<IfModule mime_module>
    TypesConfig conf/mime.types
    AddEncoding x-gzip .gz
    AddType application/x-compress .Z

EnableMMAP On
KeepAlive On
FileETag MTime Size
UseCanonicalName On

<IfModule mod_cache.c>
  <IfModule mod_disk_cache.c>
    CacheNegotiatedDocs On
    CacheDefaultExpire 60
    CacheMaxExpire 120
    CacheRoot /usr/local/apache2/cache
    CacheEnable disk /
    CacheDirLevels 10
    CacheDirLength 1

<IfModule mod_proxy.c>
  ProxyRequests On
  ProxyVia On
  AllowCONNECT 443 563 9485
  ProxyRemote *

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message