LRUCache
A cache utilizing a simple LRU (Least Recently Used) policy. The items managed by this cache must respond to the key method. Attempts to optimize reads rather than inserts!
LRU semantics are enforced by inserting the items in a queue. The lru item is always at the tail. Two special sentinels (head, tail) are used to simplify (?) the code.
Authors
- George Moschovitis
- Anastasios Koutoumanos
Copying
Copyright 2004 George Moschovitis, Anastasios Koutoumanos
Ruby License
This module is free software. You may use, modify, and/or redistribute this software under the same terms as Ruby.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.