Class: GraphAgent::CachePolicy
- Inherits:
-
Object
- Object
- GraphAgent::CachePolicy
- Defined in:
- lib/graph_agent/types/cache_policy.rb
Instance Attribute Summary collapse
-
#key_func ⇒ Object
readonly
Returns the value of attribute key_func.
-
#ttl ⇒ Object
readonly
Returns the value of attribute ttl.
Instance Method Summary collapse
-
#initialize(key_func: nil, ttl: nil) ⇒ CachePolicy
constructor
A new instance of CachePolicy.
Constructor Details
#initialize(key_func: nil, ttl: nil) ⇒ CachePolicy
Returns a new instance of CachePolicy.
7 8 9 10 |
# File 'lib/graph_agent/types/cache_policy.rb', line 7 def initialize(key_func: nil, ttl: nil) @key_func = key_func @ttl = ttl end |
Instance Attribute Details
#key_func ⇒ Object (readonly)
Returns the value of attribute key_func.
5 6 7 |
# File 'lib/graph_agent/types/cache_policy.rb', line 5 def key_func @key_func end |
#ttl ⇒ Object (readonly)
Returns the value of attribute ttl.
5 6 7 |
# File 'lib/graph_agent/types/cache_policy.rb', line 5 def ttl @ttl end |