simple_cacheable icon indicating copy to clipboard operation
simple_cacheable copied to clipboard

cache keys for non persisted objects

Open ScotterC opened this issue 12 years ago • 0 comments

user1 = User.new(attributes)
user1.cached_method 
#=> data
user2 = User.new(diff_attributes)
user2.cached_method
#=> user1's data

When an object isn't persisted, it doens't have a fully formed cache key, so it uses a shared one. This isn't a problem often, but it could be solved by not caching information for non persisted objects.

ScotterC avatar Nov 18 '13 18:11 ScotterC