Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Add a reload section to the readme

  • Loading branch information...
commit af13380d3d0e182a9c645bcc05b669a80a973296 1 parent a7cbea7
@matthewrudy authored
Showing with 17 additions and 0 deletions.
  1. +17 −0
@@ -46,6 +46,23 @@ You can even memoize method that takes arguments.
This will only be calculated once per value of income.
+Each memoized function comes with a way to flush the existing value.
+ person.social_security # returns the memoized value
+ person.social_security(true) # bypasses the memoized value and rememoizes it
+This also works with a memoized method with arguments
+ person.taxes_due(100_000) # returns the memoized value
+ person.taxes_due(100_000, true) # bypasses the memoized value and rememoizes it
+If you want to flush the entire memoization cache for an object
+ person.flush_cache

0 comments on commit af13380

Please sign in to comment.
Something went wrong with that request. Please try again.