Hash
# File lib/dragonfly/simple_cache.rb, line 4 def initialize(max_size) @max_size = max_size @keys = [] end
# File lib/dragonfly/simple_cache.rb, line 11 def []=(key, value) if !has_key?(key) @keys << key if size == max_size key_to_purge = @keys.shift delete(key_to_purge) end end super end
[Validate]
Generated with the Darkfish Rdoc Generator 2.