Is rails caching my date

I have an app that is supposed to expire items based on a comparison of
the expiration date of the item and the current date. So if expiration
date < current date, I do not want to display the item. Rails seems to
be caching something, because the variable I set for the current date is
from a few days back - when I restart mongrel it must release the cache
because it expires my items as it should. Here is what I have in my
controller:

def list_items
today = Time.now.beginning_of_day.to_date.strftime("%Y-%m-%d")
@items = Item.find(:all,:conditions => “expiration>=’#{today}’”)
end

How can I stop rails from caching @today?

Hi Yanni

Date.today.to_s will give you what you want for today. “2007-08-31”

How about trying:

@items = Item.find(:all, :conditions => [‘expiration >= ?’,Date.today])

thats if your date column is a datetime field.

Regards
Ivor