Class: Rack::Cache::AppEngine::MemCache
- Inherits:
-
Object
- Object
- Rack::Cache::AppEngine::MemCache
- Defined in:
- lib/rack/cache/app_engine.rb
Instance Method Summary collapse
- #contains?(key) ⇒ Boolean
- #delete(key) ⇒ Object
- #get(key) ⇒ Object
-
#initialize(options = {}) ⇒ MemCache
constructor
A new instance of MemCache.
- #namespace ⇒ Object
- #namespace=(value) ⇒ Object
- #put(key, value, ttl = nil) ⇒ Object
Constructor Details
Instance Method Details
#contains?(key) ⇒ Boolean
21 22 23 |
# File 'lib/rack/cache/app_engine.rb', line 21 def contains?(key) MC::Service.contains(key) end |
#delete(key) ⇒ Object
44 45 46 |
# File 'lib/rack/cache/app_engine.rb', line 44 def delete(key) MC::Service.delete(key) end |
#get(key) ⇒ Object
25 26 27 28 |
# File 'lib/rack/cache/app_engine.rb', line 25 def get(key) value = MC::Service.get(key) Marshal.load(Base64.decode64(value)) if value end |
#namespace ⇒ Object
36 37 38 |
# File 'lib/rack/cache/app_engine.rb', line 36 def namespace MC::Service.getNamespace end |