Skip to content


Update to include memoization bypass description #6

merged 1 commit into from

2 participants


No description provided.

@matthewrudy matthewrudy merged commit a7cbea7 into matthewrudy:master


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 11, 2013
  1. @andreychernih


    andreychernih committed
Showing with 11 additions and 1 deletion.
  1. +11 −1
@@ -24,7 +24,17 @@ Just extend with the Memoist module
And person.social_security will only be calculated once.
-You can even do it with a method that takes arguments.
+Every memoized function (which initially was not accepting any arguments) has a ```(reload)```
+argument you can pass in to bypass and reset the memoization:
+ def some_method
+ end
+ memoize :some_method
+Calling ```some_method``` will be memoized, but calling ```some_method(true)``` will rememoize each time.
+You can even memoize method that takes arguments.
class Person
Something went wrong with that request. Please try again.