Class: BusinessFlow::Cacheable::ClassMethods::CacheOptions
- Inherits:
-
Struct
- Object
- Struct
- BusinessFlow::Cacheable::ClassMethods::CacheOptions
- Defined in:
- lib/business_flow/cacheable.rb
Overview
Responsible for converting our DSL options into cache store options
Instance Attribute Summary collapse
-
#ttl ⇒ Object
Returns the value of attribute ttl.
Instance Method Summary collapse
Instance Attribute Details
#ttl ⇒ Object
Returns the value of attribute ttl
19 20 21 |
# File 'lib/business_flow/cacheable.rb', line 19 def ttl @ttl end |
Instance Method Details
#to_store_options(flow) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/business_flow/cacheable.rb', line 20 def (flow) # compact is not available in Ruby <2.4 or ActiveSupport < 4, so # we can't use it here. = {} [:expires_in] = ttl.call(flow, nil) if ttl end |