Domanda

I've nginx and unicorn on VPS as production environment.

And when I add any model instance (article, post - anything) by a form of site, and click on an any link, that assigned page must shows this added content (list of articles or posts for example) - new added article I don't see it.

Or same situation with updating avatar/photo (I use paperclip gem for this).

But if I'll press F5 - they show immediately.

However, where is not any cached actions in controllers.

I don't now to where I must to dig...

Configs:
Nginx: http://pastebin.com/MdJq4PyP
Unicorn: http://pastebin.com/UrMuCAkB

È stato utile?

Soluzione

You nginx config tells browser to cache your dynamic content, which is not good. You may want to remove these 2 lines:

expires max;
add_header Cache-Control public;

Pressing F5 will force browser to bypass its own cache and go to server to load the content again.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top