When not to use Memoization in Ruby on Rails

Memoization is a wonderful concept in programming world. It helps in writing clean code which execute faster. Example: def slow_method @result ||= perform_slow_method end In the above code, slow_method will cache perform_slow_method in @resultvariable, therefore perform_slow_method will execute only once. So, if memoization is wonderful then why not to use it always? that’s the question I am going to answer … Continue reading When not to use Memoization in Ruby on Rails