I have this set up in my 000-default:

    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

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.



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.

header("Cache-Control: must-revalidate, max-age=3600");
header("Vary: Accept-Encoding");
echo time();
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.