> @expiry_date_cache ||= {}
> @expiry_date_cache[user.id] ||= find_if_expiry_date_for(user)

>From the beginning my code was silly. The cache has to be tied to an 
object that only exists for the current request being processed. So I 
have refactored it.

tdd/bdd/rspec/test::unit/whatever helped me to discover this.
-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to