class Startback::Caching::Store
Caching
store specification & dummy implementation.
This class should not be used in real project, as it implements See the 'cache' gem that provides conforming implementations.
Attributes
saved[R]
Public Class Methods
new()
click to toggle source
# File lib/startback/caching/store.rb, line 11 def initialize @saved = {} end
Public Instance Methods
delete(key)
click to toggle source
# File lib/startback/caching/store.rb, line 28 def delete(key) saved.delete(key) end
exist?(key)
click to toggle source
# File lib/startback/caching/store.rb, line 16 def exist?(key) saved.has_key?(key) end
get(key)
click to toggle source
# File lib/startback/caching/store.rb, line 20 def get(key) saved[key] end
set(key, value, ttl)
click to toggle source
# File lib/startback/caching/store.rb, line 24 def set(key, value, ttl) saved[key] = value end