Module: RedisKit::Cache::Helper::ClassMethods
- Defined in:
- lib/redis-kit/cache/helper.rb
Instance Method Summary collapse
- #cache_namespace(value = nil) ⇒ Object
- #cache_timeout(value = nil) ⇒ Object
- #cached(key, timeout = nil, &block) ⇒ Object
- #expire(key) ⇒ Object
Instance Method Details
#cache_namespace(value = nil) ⇒ Object
9 10 11 12 |
# File 'lib/redis-kit/cache/helper.rb', line 9 def cache_namespace( value = nil ) @cache_namespace = value.to_s unless value == nil @cache_namespace || "" end |
#cache_timeout(value = nil) ⇒ Object
14 15 16 17 |
# File 'lib/redis-kit/cache/helper.rb', line 14 def cache_timeout( value = nil ) @cache_timeout = value if value @cache_timeout || 60 end |