Welcome! Log In Create A New Profile

Advanced

A Challenging Config

June 25, 2012 10:32AM
Ok, Ive been working on a project for a long time. It involves automated
config file building for the nginx web server :)
Now im adding caching. The user of the software can using the interface
select regex's to apply caching logic to.

Ive devided the cache types into 3 types:
1. CACHE: Cache if possible
2. FORCE-CACHE: Cache always, ignore Cache-Control headers
3. NEVER CACHE

all other traffic is caught by the default "/" location. Execution order
for these statements is from 1->3 (e.g 3 should override 1).

I have a couple questions:

1) How can I ignore the effect of cache control on caching?
proxy_hide_header?

2) What is the most efficient order to acheive this caching override
system, my origional idea was to just use location blocks like

location ~ to_cache {
proxy_cache ....;
proxy_pass ....;
}

location ~ not_to_cache {
proxy_cache off;
proxy_pass ....;
}

location / {
proxy_pass ....;
}

is this right? Im not really sure I understand the wiki text on matching
order.

Thanks in advance,
SplitIce
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

A Challenging Config

splitice June 25, 2012 10:32AM

Re: A Challenging Config

Maxim Dounin June 25, 2012 11:04AM

Re: A Challenging Config

splitice June 25, 2012 11:38PM

Re: A Challenging Config

Maxim Dounin June 26, 2012 02:46AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 92
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready