memcached - Expire option doesn't work in Rails.cache -
i use rails.cache.fetch method :expires_in option in rails 2.3.10.
rails.cache.fetch "key", :expires_in => 2.seconds
in development, cache never expired , rails hits cache.
log: "cache hit"
the default cache in rails 2 activesupport::cache::memorystore
. not support expiration :expires_in
option. in fact, only activesupport::cache::memcachestore
has support cache expiration.
in rails 3, :expires_in
supported cache stores.
Comments
Post a Comment