Class: Aws::LRUCache::Entry Private
- Inherits:
-
Object
- Object
- Aws::LRUCache::Entry
- Defined in:
- lib/aws-sdk-core/lru_cache.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #value ⇒ Object readonly private
Instance Method Summary collapse
- #expired? ⇒ Boolean private
-
#initialize(options = {}) ⇒ Entry
constructor
private
A new instance of Entry.
Constructor Details
#initialize(options = {}) ⇒ Entry
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Entry.
59 60 61 62 63 |
# File 'lib/aws-sdk-core/lru_cache.rb', line 59 def initialize( = {}) @value = [:value] @expiration = [:expiration] @created_time = Time.now end |
Instance Attribute Details
#value ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
66 67 68 |
# File 'lib/aws-sdk-core/lru_cache.rb', line 66 def value @value end |
Instance Method Details
#expired? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
68 69 70 71 72 |
# File 'lib/aws-sdk-core/lru_cache.rb', line 68 def expired? return false unless @expiration Time.now - @created_time > @expiration end |