I understand how to turn caching on or off. Well let me explain.
let's say if I am using memcache and I have a post listing page that
uses the following method. Now If I want to not use caching in
development I will have to write this method without the CACHE.fetch?
So basically, I am doing a if/else in every method do check if it's
dev or prod and then either get the collection/fragment from the CACHE
or not. This seems ugly, wondering if there is a better way.
def get_all_post
CACHE.fetch("all_posts") {Post.all}
end
>
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/...