Re: Checking multiple caches before forwarding request to upstream

2017-04-07 Thread sachin.she...@gmail.com
Hi Maxim, I found one way to make this work using lua to set the cache name. It seems to be working ok, all my tests passed. """ Lua Script local resty_md5 = require "resty.md5" local str = require "resty.string" local md5 = resty_md5:new(); local posix = require("posix") local days_30 = 1000 *

Re: Checking multiple caches before forwarding request to upstream

2017-04-06 Thread sachin.she...@gmail.com
Thanks, I guess actual proxying is the only way out. I will try it out. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,273446,273454#msg-273454 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: Checking multiple caches before forwarding request to upstream

2017-04-06 Thread Maxim Dounin
Hello! On Thu, Apr 06, 2017 at 06:45:23AM -0400, sachin.she...@gmail.com wrote: > Hi, > > We want to define multiple caches based on certain request headers (time > stamp) so that we can put files modified in last 10 days on SSDs, last 30 > days on HDDs and so on. I understand that we could use

Checking multiple caches before forwarding request to upstream

2017-04-06 Thread sachin.she...@gmail.com
Hi, We want to define multiple caches based on certain request headers (time stamp) so that we can put files modified in last 10 days on SSDs, last 30 days on HDDs and so on. I understand that we could use map feature to pick a cache dynamically which is good and works for us. But when serving a