best way to not cache large files?

Mark Moseley moseleymark at gmail.com
Tue Mar 15 17:44:26 CET 2011


On Tue, Mar 15, 2011 at 12:42 AM, Chris Hecker <checker at d6.com> wrote:
>
> Yeah, I think if I can't do it Right (which I define as checking the file
> size in the vcl), then I'm just going to make blah.com/uncached/* be
> uncached.  I don't want to transfer it once just to throw it away.
>
> Chris
>
>
> On 2011/03/15 00:40, Martin Boer wrote:
>>
>> I've been reading this discussion and imho the most elegant way to do it
>> is to have a upload directory X and 2 download directories Y and Z with
>> a script in between that decides whether it's cacheable and move the
>> file to Y or uncacheable and put it in Z.
>> All the other solutions mentioned in between are far more intelligent
>> and much more likely to backfire in some way or another.
>>
>> Just my 2 cents.
>> Martin
>>
>>
>> On 03/13/2011 05:28 AM, Chris Hecker wrote:
>>>
>>> I have a 400mb file that I just want apache to serve. What's the best
>>> way to do this? I can put it in a directory and tell varnish not to
>>> cache stuff that matches that dir, but I'd rather just make a general
>>> rule that varnish should ignore >=20mb files or whatever.
>>>
>>> Thanks,
>>> Chris

Yeah, if you have control over directory names, that's by far the
better way to go. I've got shared hosting customers behind mine, so
I've got practically no control over where they put stuff under their
webroot.




More information about the varnish-misc mailing list