Class: GraphAgent::CachePolicy

Inherits:
Object
  • Object
show all
Defined in:
lib/graph_agent/types/cache_policy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_funcObject (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

#ttlObject (readonly)

Returns the value of attribute ttl.



5
6
7
# File 'lib/graph_agent/types/cache_policy.rb', line 5

def ttl
  @ttl
end