Registry / utility / rufus-lru

rufus-lru

JSON →
library1.1.0rbrubygemsunverified

Implements an LruHash class, a Hash with a maximum size controlled by a least-recently-used eviction mechanism.

gem install rufus-lru
INSTALL
IMPORT
SIG · RUFUS-LRU
R
rufus-lru
utilityrubyv1.1.0
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.

Rufus::Lru
require 'rufus/lru'

Creates an LRU hash with max size 3 and adds four items, evicting the least recently used.

require 'rufus/lru' hash = Rufus::Lru::LruHash.new(3) hash[:a] = 1 hash[:b] = 2 hash[:c] = 3 hash[:d] = 4 puts hash.keys
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.1.0latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
rufus-lru — gem install rufus-lru · libregistry