Hi,
I’m using ngx_srcache module with Memcached to cache static contents of the upstream servers. This is based on static file extensions. Now I need to cached them by looking at Content-Type of the header to cache .html pages as we do not use the .html extension. (i.e. http://www.example.com/this-is-my-site )
Is this possible with ngx_srcache module using map module or something similar..
http {
map $upstream_http_content_type $no_proxy {
default 0;
~*^html/ 0;
}
and hook this $no_proxy to ngx_srcache variables like I’m doing with extension…?
location ~* \.(html)$ {
set $key $uri$args;
srcache_fetch GET /memc key=$key;
srcache_store PUT /memc key=$key&exptime=$ttl_1m;
proxy_pass http://www.example.com;
}
Any help to this is really appreciated.
Thanks in advance.