module Algorithmable::Cache::Methods

Public Instance Methods

clear() click to toggle source
# File lib/algorithmable/cache/methods.rb, line 4
def clear
  @storage = {}
  @index = []
  self
end
pop() click to toggle source
# File lib/algorithmable/cache/methods.rb, line 10
def pop
  key = @index.delete @index.last
  @storage.delete key
end