Class: AmplitudeExperiment::CacheItem

Inherits:
Object
  • Object
show all
Defined in:
lib/experiment/util/lru_cache.rb

Overview

CacheItem

Instance Attribute Summary collapse

Instance Method Summary collapse

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_atObject

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

#keyObject

Returns the value of attribute key.



15
16
17
# File 'lib/experiment/util/lru_cache.rb', line 15

def key
  @key
end

#valueObject

Returns the value of attribute value.



15
16
17
# File 'lib/experiment/util/lru_cache.rb', line 15

def value
  @value
end