class LRUCache::Datum

Attributes

expiration[R]
soft_expiration[RW]
value[R]

Public Class Methods

new(value, expiration, soft_expiration) click to toggle source
# File lib/lrucache.rb, line 116
def initialize(value, expiration, soft_expiration)
  @value = value
  @expiration = expiration
  @soft_expiration = soft_expiration
end

Public Instance Methods

expired?() click to toggle source
# File lib/lrucache.rb, line 122
def expired?
  !@expiration.nil? && @expiration <= Time.now
end
soft_expired?() click to toggle source
# File lib/lrucache.rb, line 126
def soft_expired?
  !@soft_expiration.nil? && @soft_expiration <= Time.now
end