Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (32 sloc) 668 Bytes
module ActiveSupport
module Cache
class MemoryStore < Store
def initialize
@data = {}
end
def read(name, options = nil)
super
@data[name]
end
def write(name, value, options = nil)
super
@data[name] = value.freeze
end
def delete(name, options = nil)
super
@data.delete(name)
end
def delete_matched(matcher, options = nil)
super
@data.delete_if { |k,v| k =~ matcher }
end
def exist?(name,options = nil)
super
@data.has_key?(name)
end
def clear
@data.clear
end
end
end
end
Something went wrong with that request. Please try again.