Class: RestrictCache::Base
- Inherits:
-
Object
- Object
- RestrictCache::Base
- Defined in:
- lib/restrict_cache/base.rb
Class Method Summary collapse
Class Method Details
.cache_key ⇒ Object
10 11 12 |
# File 'lib/restrict_cache/base.rb', line 10 def cache_key self.name end |
.instance ⇒ Object
4 5 6 7 8 |
# File 'lib/restrict_cache/base.rb', line 4 def instance _cache = RestrictCache.custom_cache.contents(cache_key) _cache = RestrictCache.custom_cache.add(self.new) unless _cache _cache end |