Class: Borges::LRUCache

# Borges::LRUCache (Class)

In: | lib/Borges/Utilities/LRUCache.rb
Parent: | Object

A least recently used cache

## Methods

fetch new size store

## Constants

DEFAULT_CAPACITY | = | 20
| The default capacity of the LRUCache.

## Attributes

capacity | [RW] | The number of items the LRUCache can hold.

## Public Class methods

new(capacity = DEFAULT_CAPACITY)

Create a new LRUCache that can accomodate up to `capacity` objects.

## Public Instance methods

fetch(key)

Fetches `key` from the LRUCache.

size()

Returns the number of items stored in the LRUCache.

store(object)

Stores `object` in the cache, returning a key that can be used to retrive it.

[Validate]