Are we being lazy with memoization?
Sometimes we need to memoize/cache expensive operations. A typical case is to avoid multiple database calls. A common Ruby technique is to use the lazy evaluation operator ||=
def customer
@customer ||= Customer.find(@customer_id)
end
If @cu...
ljones140.hashnode.dev5 min read