Class: RestrictCache::Cacheable::CustomCache
- Inherits:
-
Base
- Object
- Base
- RestrictCache::Cacheable::CustomCache
show all
- Defined in:
- lib/restrict_cache/cacheable/custom_cache.rb
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #size
Instance Method Details
#add(cache_key, content) ⇒ Object
4
5
6
|
# File 'lib/restrict_cache/cacheable/custom_cache.rb', line 4
def add(cache_key, content)
@caches[cache_key.to_sym] = content
end
|
#contents(cache_key = nil) ⇒ Object
8
9
10
|
# File 'lib/restrict_cache/cacheable/custom_cache.rb', line 8
def contents(cache_key = nil)
cache_key ? @caches[cache_key.to_sym] : nil
end
|