Registry / utility / memoizer

memoizer

JSON →
library1.0.3rbrubygemsunverified

Memoizer caches the results of method calls, supporting arguments and nil returns as a simpler alternative to ActiveSupport::Memoizable.

gem install memoizer
INSTALL
IMPORT
SIG · MEMOIZER
M
memoizer
utilityrubyv1.0.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Memoizer
require 'memoizer'

Memoize a method to cache its results.

require 'memoizer' class Calculator extend Memoizer def compute(x) sleep 1 x * 2 end memoize :compute end c = Calculator.new puts c.compute(5) # takes 1 second puts c.compute(5) # instant (cached)
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.0.3latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
memoizer — gem install memoizer · libregistry