1

I have this set up in my 000-default:

<VirtualHost 192.168.1.10:80>
    ServerName live.website.com
    DocumentRoot /var/www/live.website.com
    SetOutputFilter INFLATE;proxy-html;DEFLATE
    CacheEnable mem http://live.website.com/
        MCacheSize 4096
        MCacheMaxObjectCount 1000
        MCacheMaxObjectSize 2048
    CacheDefaultExpire 3600
        CacheMaxExpire 3600
        CacheStoreNoStore On
        CacheStorePrivate On
        CacheIgnoreCacheControl On
        CacheIgnoreNoLastMod On
        MCacheMaxStreamingBuffer 2097152
</VirtualHost>

this page http://live.website.com/index.php only printing : time(), but I see that after 10 seconds the time is re-cached.
Also tried disk, but I get the same results.

Ubuntu + lamp latest.

Thanks

emcconville
  • 502
  • 5
  • 11
yos mishan
  • 11
  • 3

1 Answers1

0

A regular PHP script will need to include additional HTTP header information for mod_cache to work. See section "What Can be Cached?" from Apache's Caching Guide.

<?php
header("Cache-Control: must-revalidate, max-age=3600");
header("Vary: Accept-Encoding");
echo time();
emcconville
  • 502
  • 5
  • 11