1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Can't get cacheing to work, Apache 2.4

Discussion in 'Apache' started by gigabyte26, Jan 7, 2015.

  1. #1
    I'm trying to get cacheing working using Apache 2.4, but when I view the response headers after various page requests, they always indicate a cache-miss. I've been googling the web to see if others are reporting the same problem, but without luck - seems as though everyone else understands Apache cacheing!.

    The origin server is writing the following (typical) cache headers to the response:
    Cache-Control: s-maxage=1200, max-age=600
    Expires: Wed, 07 Jan 2015 21:20:32 GMT
    Last-Modified: Wed, 31 Dec 2014 18:04:13 GMT

    Apache typically adds the following header each time I do a browser-refresh:
    X-Cache-Detail: "cache miss: attempting entity save" from my.server.com


    I'm using the following cache directives:
    CacheDetailHeader on
    CacheLockPath /var/cache/apache2/lock
    CacheLockMaxAge 5
    CacheRoot /var/cache/apache2/mod_cache_disk
    CacheDirLevels 2
    CacheDirLength 1


    I'm also using the following virtual host config:
    <VirtualHost *:80>
    ServerName my.server.com
    CacheEnable disk /
    ProxyPass / <my server on port 8080>
    ProxyPassReverse / <my server on port 8080>
    </VirtualHost>

    With this configuration, requests reach the origin server each time - they are never satisfied by Apache. Any ideas would be much appreciated.
     
    gigabyte26, Jan 7, 2015 IP