Forum: Ruby on Rails Unwanted caching

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
51cdfc97866048aeb30af8c6abe70168?d=identicon&s=25 Serafino P. (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.
This topic is locked and can not be replied to.