class HexaPDF:: Utils:: LRUCache
| Parent | Object |
|---|
A simple least recently used (LRU) cache.
The cache relies on the fact that Ruby’s Hash class maintains insertion order. So deleting and re-inserting a key-value pair on access moves the key to the last position. When an entry is added and the cache is full, the first entry is removed.
Public Class Methods
Public Instance Methods
Returns the stored value for key or nil if no value was stored under the key.
Stores the value under the key.