rails action cache can help performance a lot
but there is a drawback with action cache, it just can output text/html header content-type, eg: can not output text/xml header content-type for your blog rss feed.
I think there may need a hacker with reverse proxy server like nginx.
the config will like below, from now on nginx just support add_header syntax which means nginx will add user custom header to app server response header without check if the header already exist
location /rss {
set_header content_type text/xml;
proxy_pass http://app_server;
break;
}
the set_header will check the output header parameter if exist replace it with user custom. if not just add to the header
but there is a drawback with action cache, it just can output text/html header content-type, eg: can not output text/xml header content-type for your blog rss feed.
I think there may need a hacker with reverse proxy server like nginx.
the config will like below, from now on nginx just support add_header syntax which means nginx will add user custom header to app server response header without check if the header already exist
location /rss {
set_header content_type text/xml;
proxy_pass http://app_server;
break;
}
the set_header will check the output header parameter if exist replace it with user custom. if not just add to the header