class ActiveSupport::Cache::LibmemcachedStore::FetchWithRaceConditionTTLEntry
Attributes
extended[RW]
value[RW]
Public Class Methods
new(value, expires_in)
click to toggle source
# File lib/active_support/cache/libmemcached_store.rb, line 29 def initialize(value, expires_in) @value, @extended = value, false @expires_at = Time.now.to_i + expires_in end
Public Instance Methods
expired?()
click to toggle source
# File lib/active_support/cache/libmemcached_store.rb, line 38 def expired? @expires_at <= Time.now.to_i end
expires_in()
click to toggle source
# File lib/active_support/cache/libmemcached_store.rb, line 34 def expires_in [@expires_at - Time.now.to_i, 1].max # never set to 0 -> never expires end