class PgParty::Cache::Entry
Attributes
value[R]
Public Class Methods
new(value)
click to toggle source
# File lib/pg_party/cache.rb, line 54 def initialize(value) @value = value @timestamp = Time.now end
Public Instance Methods
expired?()
click to toggle source
# File lib/pg_party/cache.rb, line 59 def expired? ttl.positive? && Time.now - @timestamp > ttl end
Private Instance Methods
ttl()
click to toggle source
# File lib/pg_party/cache.rb, line 65 def ttl PgParty.config.caching_ttl end