Class: AmplitudeExperiment::CacheItem
- Inherits:
-
Object
- Object
- AmplitudeExperiment::CacheItem
- Defined in:
- lib/experiment/util/lru_cache.rb
Overview
CacheItem
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#key ⇒ Object
Returns the value of attribute key.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(key, value) ⇒ CacheItem
constructor
A new instance of CacheItem.
Constructor Details
#initialize(key, value) ⇒ CacheItem
Returns a new instance of CacheItem.
17 18 19 20 21 |
# File 'lib/experiment/util/lru_cache.rb', line 17 def initialize(key, value) @key = key @value = value @created_at = (Time.now.to_f * 1000).to_i end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
15 16 17 |
# File 'lib/experiment/util/lru_cache.rb', line 15 def created_at @created_at end |
#key ⇒ Object
Returns the value of attribute key.
15 16 17 |
# File 'lib/experiment/util/lru_cache.rb', line 15 def key @key end |
#value ⇒ Object
Returns the value of attribute value.
15 16 17 |
# File 'lib/experiment/util/lru_cache.rb', line 15 def value @value end |