

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
22 messages in ru.sysoev.nginxRe: nginx + caching of static files| From | Sent On | Attachments |
|---|---|---|
| Payam Chychi | Apr 6, 2009 10:14 pm | |
| Igor Sysoev | Apr 6, 2009 10:27 pm | |
| Payam Chychi | Apr 6, 2009 10:46 pm | |
| Igor Sysoev | Apr 6, 2009 10:53 pm | |
| Payam Chychi | Apr 6, 2009 11:03 pm | |
| Payam Chychi | Apr 7, 2009 12:55 am | |
| Igor Sysoev | Apr 7, 2009 1:00 am | |
| Payam Chychi | Apr 7, 2009 2:02 am | |
| pf shineyear | Apr 7, 2009 2:30 am | |
| 伍鹏 | Apr 7, 2009 7:51 pm | |
| Igor Sysoev | Apr 8, 2009 4:03 am | |
| Glen Lumanau | Apr 8, 2009 4:16 am | |
| Igor Sysoev | Apr 8, 2009 4:17 am | |
| Tomasz Pajor | Apr 8, 2009 4:49 am | |
| Maxim Dounin | Apr 8, 2009 6:37 am | |
| Resicow | Apr 9, 2009 12:26 pm | |
| Igor Sysoev | Apr 9, 2009 11:40 pm | |
| yangguangli | Apr 10, 2009 1:48 am | |
| Igor Sysoev | Apr 10, 2009 3:46 am | |
| Kirill A. Korinskiy | Apr 10, 2009 3:59 am | |
| Resi Cow | Apr 10, 2009 8:14 am | |
| xs23933 | May 26, 2009 1:21 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: nginx + caching of static files | Actions... |
|---|---|---|
| From: | Payam Chychi (pchy...@gmail.com) | |
| Date: | Apr 6, 2009 10:46:01 pm | |
| List: | ru.sysoev.nginx | |
2009/4/6 Igor Sysoev <is...@rambler-co.ru>:
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/
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; }
few questions: 1- what does the keys_zone used for 2- what does the "200 1h" in proxy_cache_valid mean 3- how is the "proxy_cache_use_stale error timeout invalid_header" used?
thanks again Igor, -Payam







