Skip to content

Latest commit

 

History

History
executable file
·
7 lines (4 loc) · 370 Bytes

File metadata and controls

executable file
·
7 lines (4 loc) · 370 Bytes

Ruby Memoization

Memoization is a technique you can use to cache the result of a method that do time-consuming work and can be executed once.

That means that you’ll only make the network call the first time you call memoized_friends, and future calls will just return the value of the instance variable @friends.

ruby-memoization.png