I have a rails application, in that I am using simple rails cache. My testing is as follows:
Rails.cache.write(\'temp\',Date.today,:expires_in => 60.seconds)
The :expires_in
option only works with compatible stores (eg memcached) - not memory.
From http://guides.rubyonrails.org/caching_with_rails.html:
Finally, if you are using memcached or Ehcache, you can also pass :expires_in. In fact, all parameters not used by caches_action are sent to the underlying cache store.