Class: Cache::Config
- Inherits:
-
Object
- Object
- Cache::Config
- Defined in:
- lib/cache/config.rb
Overview
Here’s where config options are kept.
Example:
cache.config.default_ttl = 120 # seconds
Instance Method Summary collapse
-
#default_ttl ⇒ Object
:nodoc:.
-
#default_ttl=(seconds) ⇒ Object
TTL for method caches.
Instance Method Details
#default_ttl ⇒ Object
:nodoc:
15 16 17 |
# File 'lib/cache/config.rb', line 15 def default_ttl #:nodoc: @default_ttl || 60 end |
#default_ttl=(seconds) ⇒ Object
TTL for method caches. Defaults to 60 seconds.
Example:
cache.config.default_ttl = 120 # seconds
11 12 13 |
# File 'lib/cache/config.rb', line 11 def default_ttl=(seconds) @default_ttl = seconds end |