Implements a cache using a parameterizable strategy and a storage. The protocol that the store must understand is:

  fetch(key) -> val
  has_key?(key)
  delete(key) -> val
  each {|key, val| }
Methods
Public Class methods
new(strategy, store=Hash.new, store_on_update=false) [ source ]
Public Instance methods
[](key, default_value=nil)

Alias for fetch

[]=(key, value)

Alias for store

delete(key) [ source ]
fetch(key, default_value=nil) [ source ]
This method is also aliased as []
has_key?(key) [ source ]
store(key, value) [ source ]
This method is also aliased as []=