best way to not cache large files?
Chris Hecker
checker at d6.com
Wed Mar 16 00:56:37 CET 2011
I'm not sure I understand. I have control over the back end, the front
end, the middle end, all the ends. However, I thought the problem was
there was no way to get varnish to read the header without loading the
file into the cache? If that's not true, then shouldn't Content-Length
be enough?
Chris
On 2011/03/15 13:16, Ken Brownfield wrote:
> I'm assuming that in this case it's not possible for you to have the
> backend server emit an appropriate Cache-Control or Expires header based
> on the size of the file? The server itself will know the file size
> before transmission, and the reindeer caching games would not be
> necessary. ;-)
>
> That's definitely the Right Way, but it would require control over the
> backend, which is often not possible. Apache unfortunately doesn't have
> a built-in mechanism/module to emit a header based on file size, at
> least that I can find. :-(
> --
> kb
>
>
>
> On Tue, Mar 15, 2011 at 00:42, Chris Hecker <checker at d6.com
> <mailto: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/* <http://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
>
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> <mailto:varnish-misc at varnish-cache.org>
> http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
>
>
>
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org <mailto:varnish-misc at varnish-cache.org>
> http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
>
>
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
More information about the varnish-misc
mailing list