Using rails nginx with passenger. I put the following in the nginx.conf file fo开发者_运维百科r caching images, js. etc. But now I notice that my ajax calls are cached or rather the expiration is set to some 30 years in future. I would like to have the javascripts cached but not the ajax calls. How do I do it?
location ~* ^.+.(jpg|jpeg|gif|png|css|js|swf)?([0-9]+)?$ {
expires max;
passenger_enabled on;
}
I am seeing this on firefox 3.5
Well I just set the cache:false in
jQuery.ajaxSetup({
cache: false,
'beforeSend': function (xhr) {
xhr.setRequestHeader("Accept", "text/javascript")
}
});
});
If there is a better way or if this works against memcaching please let me know.
Thanks
精彩评论