philiprehberger-memo is a Ruby package for practical memoization with TTL, LRU eviction, and thread-safety. It is described as a Ruby library and includes a mixin, Philiprehberger::Memo, for memoizing methods in a class.
The README shows memoization on instance methods such as find, expensive_query, and config. It supports optional ttl and max_size arguments, returns cached results on repeated calls, and provides manual invalidation through clear_memo and clear_all_memos. The package also includes cache statistics for individual methods and aggregated across all memoized methods, with hit counts, miss counts, and hit rate. Additional methods let callers check whether a specific call is cached, list memoized methods, measure cache size, remove a single cached call signature, and force a recomputation with refresh_memo. A separate cache API is documented as Philiprehberger::Memo::Cache, with methods for getting, setting, deleting, listing keys, pruning expired entries, and clearing the cache.
The package is documented as per-instance caching rather than class-level caching. It handles nil and false return values correctly, works with positional and keyword arguments, and uses per-instance mutexes for thread safety. The README also states that expired entries can be pruned eagerly without resetting stats.
Ruby = 3.1 is listed as a requirement. Installation is shown through a Gemfile entry or the gem install command, and the package is available on RubyGems and GitHub. It is released under the MIT license. The page also identifies version 0.7.0 and a download count of 940,166.
philiprehberger-memo sits in PulseGate's Frameworks & SDKs category. It focuses on adding efficient memoization with advanced features to Ruby applications. It is built as an open-source project for ruby developers. The project is open source (MIT). It runs on the web and the command line.
Philip Rehberger builds and maintains philiprehberger-memo, and it first shipped in 2014. The project is developed in the open on GitHub with 6 commits in the last 90 days. Among its 5 catalogued features are TTL support, LRU eviction, and thread safety.
Summary written by a language model from the project’s public pages.
What PulseGate has recorded for this listing
Closest matches by what these projects do