Вопрос

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

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top