Forum: Ruby on Rails Unwanted caching

969047aea93d01a9cc636e9867f4ec0f?d=identicon&s=25 Serafino Picozzi (serpico)
on 2011-05-30 13:43

I'm experiencing a strange problem with my rails app (I'm using rails
In a sidebar I want to show, on every page, a list of the 5 latest news
inserted into the website. In my layout therefore I have someting like:

<%= render :partial => "/news/news", :collection => News.latest %>

The problem is that in production mode (I'm using passenger) whenever I
insert a news, it doesn't show up until I restart the server or wait
some time between 30-60 minutes.
Executing News.latest on a production console shows the recently
inserted news, while on the page I still can't see it, therefore I'm
pretty sure it's something related to passenger or apache.

I currently have caching disabled on the rails app, and obviously I
already tried clearing the browser cache.

Thanks in advance for your help.

P.S: when executing the query from a controller the news is displayed
correctly. This is even more obvious when I can't see the news on the
sidebar but I can see it in the news archive page.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.