nginx + caching of static files

Resi Cow resicow at gmail.com
Fri Apr 10 19:14:59 MSD 2009


Thanks,

That helps me understand how hash tables work.

Question: Is this for proxy_cache:
Bugfix: now nginx takes into account the "X-Accel-Expires", "Expires", and
"Cache-Control" header lines in a backend response.

Or are files always cached for time specified in proxy_cache_valid?

Purging would be amazing, that way I could set proxy_cache_valid to a day or
more, and know that if a change was made I could just issue a purge for that
specific key, or key path.

Any plans for nginx to manage the cache by doing a HEAD request looking for
changed content automatically on the origin at certain intervals?

Thanks!

John






2009/4/10 Igor Sysoev <is at rambler-co.ru>

> On Thu, Apr 09, 2009 at 02:27:15PM -0500, Resicow wrote:
>
> > Hi Igor (and everyone else),
> >
> > I had a few quick questions about the new proxy_cache feature, and I
> > apologize if they have already been answered.
> >
> > 1) What about query_strings? Does proxy_cache ignore or include
> > query_strings? Is there a way to have it ignore query_strings in the URL?
>
> By default qeury strings are included. You may ignore them using something
> like this:
>
>    proxy_cache_key   $host/$uri";
>
> The default proxy_cache_key approximates
>
>    proxy_cache_key  $scheme$proxy_host$uri$is_args$args;
>
> > 2) How scalable is this system? Could it handle 50 million different
> > URIs for instance?
>
> Each key takes 128 bytes in shared memory zone. Therefore you need 6.1G
> zone:
>
>   key_zone=NAME:6200m;
>
> > 3) Any plans for purge capabilities somehow, in the event you need the
> > content flushed right away?
>
> Yes, there are such plans.
>
> > Keep up the great work, thanks for making the world's best server!
> >
> > Thanks,
> >
> > John
> >
> >
> >
> >
> >
> > Igor Sysoev wrote:
> > >On Wed, Apr 08, 2009 at 11:16:30AM +0000, Glen Lumanau wrote:
> > >
> > >
> > >>How about jpg, css, js or any other files?
> > >>
> > >
> > >No problems with these files. Actually, there are no problems with flv
> > >itself. The issue is when you want to get /some.flv?start=5000.
> > >However, it seems flv handler can be converted easy enough to filter.
> > >
> > >
> > >>------Original Message------
> > >>From: Igor Sysoev
> > >>Sender: owner-nginx at sysoev.ru
> > >>To: nginx at sysoev.ru
> > >>ReplyTo: nginx at sysoev.ru
> > >>Subject: Re: Re: nginx + caching of static files
> > >>Sent: Apr 8, 2009 6:04 PM
> > >>
> > >>On Wed, Apr 08, 2009 at 10:51:59AM +0800, ???? wrote:
> > >>
> > >>
> > >>>Dear Igor,
> > >>>
> > >>>Then, how to use proxy_cache WITH flv streaming?
> > >>>I tried proxy_cache feature, but it seems that the flv streaming
> > >>>function does not work with proxy_cache.
> > >>>
> > >>No, flv is not filter, but handler, thefore it's not possible.
> > >>
> > >
> > >
> > >
> >
>
> --
> Igor Sysoev
> http://sysoev.ru/en/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20090410/72b0c17e/attachment.html>


More information about the nginx mailing list