caching php

Poul-Henning Kamp phk at phk.freebsd.dk
Wed Oct 11 17:05:56 CEST 2006


In message <20061011145129.GD34666 at efrei.fr>, Cedric Tabary writes:

>> Varnish has a "default TTL" which you can specify on the command line
>> or modify from the CLI.
>> 
>> Absent any instruction from the backend, Varnish will cache objects
>> that long.
>
>Ok so I have to put -t 0 and specify a Cache-Control with mod_expires
>on static content ?

Yes.

>And if I put a Cache-Control header in a specific php script I
>can also make it cacheable ?

Yes.

>this sounds good to me :)

I hope so :-)

The 120 second default is sort of a stab at a good default
"anti-slashdotting" setting, but obviously it's open for discussion
if ot proves to be a Bad Thing.


-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



More information about the varnish-misc mailing list