by madsohm · 1y ago · 0 comments
memoize def expensive_calculation(arg) @calculation_count += 1 arg * 2 end, ttl: 10, max_size: 2 memoize def nil_returning_method @calculation_count += 1 nil end