Unwanted caching

Hi,

I’m experiencing a strange problem with my rails app (I’m using rails
2.3.8).
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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs