Welcome! Log In Create A New Profile

Advanced

Re: Re: nginx + caching of static files

Peng Wu
April 07, 2009 10:51PM
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.

Thanks

Best Regard,

Peng Wu
2009-04-08


On Mon, Apr 06, 2009 at 10:14:36PM -0700, Payam Chychi wrote:

> Hi Guys,
>
> I was hoping someone could point out a document where it can teach me
> how to setup nginx + caching. I know that traditionally nginx did not
> have a native caching and it required you to run ncache or cachemem in
> order to perform caching of static content... but does nginx now allow
> basic static file caching without the use of any other 3rd app?
>
> Im trying to understand if nginx now has a native caching which would
> allow caching of static content. I dont want to get fancy in anyway, I
> simply want to allocate say 200mb of storage space to allow caching of
> static content. the 200mb should be updated with the most
> active/recently seen file request.
>
> reason? im trying to allow nginx to serve the static files from disk
> (if it has seen it previously) and not have to go back to the origin
> server every single time.

Get the lastest nginx (0.7.50) and use

proxy_cache_path /path/to/cache levels=1:2
keys_zone=one:10m
inactive=7d max_size=200m;

proxy_temp_path /path/to/temp; # must be on the same filesystem
# as cache

server {

location / {
proxy_pass http://backend;

proxy_cache one;
proxy_cache_key backend$request_uri;
proxy_cache_valid 200 1h;
proxy_cache_use_stale error timeout invalid_header;
}



--
Igor Sysoev
http://sysoev.ru/en/
Subject Author Posted

nginx + caching of static files

Payam Chychi April 07, 2009 01:14AM

Re: nginx + caching of static files

Igor Sysoev April 07, 2009 01:28AM

Re: nginx + caching of static files

Payam Chychi April 07, 2009 01:46AM

Re: nginx + caching of static files

Igor Sysoev April 07, 2009 01:53AM

Re: nginx + caching of static files

Payam Chychi April 07, 2009 02:03AM

Re: nginx + caching of static files

Payam Chychi April 07, 2009 03:55AM

Re: nginx + caching of static files

Igor Sysoev April 07, 2009 04:01AM

Re: nginx + caching of static files

Payam Chychi April 07, 2009 05:03AM

Re: nginx + caching of static files

pf shineyear April 07, 2009 05:31AM

Re: nginx + caching of static files

Tomasz Pajor April 08, 2009 07:50AM

Re: Re: nginx + caching of static files

Peng Wu April 07, 2009 10:51PM

Re: Re: nginx + caching of static files

Igor Sysoev April 08, 2009 07:04AM

Re: Re: nginx + caching of static files

Glen Lumanau April 08, 2009 07:16AM

Re: Re: nginx + caching of static files

Igor Sysoev April 08, 2009 07:18AM

Re: Re: nginx + caching of static files

Maxim Dounin April 08, 2009 09:37AM

Re: Re: nginx + caching of static files

xs23933 May 26, 2009 04:22AM

Re: nginx + caching of static files

Resicow April 09, 2009 03:27PM

Re: nginx + caching of static files

Igor Sysoev April 10, 2009 02:40AM

Re: nginx + caching of static files

Resi Cow April 10, 2009 11:14AM

Re: nginx + caching of static files

yangguangli April 10, 2009 04:48AM

Re: nginx + caching of static files

Igor Sysoev April 10, 2009 06:46AM

Re: nginx + caching of static files

Kirill A. Korinskiy April 10, 2009 06:59AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 242
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready