Method: AsyncStorage::Allocator#stale?
- Defined in:
- lib/async_storage/allocator.rb
#stale? ⇒ NilClass, Boolean
Check if object with a given key is stale
130 131 132 133 134 |
# File 'lib/async_storage/allocator.rb', line 130 def stale? breaker.run(fallback: -> { false }) do connection { |redis| redis.exists?(naming.body) && redis.ttl(naming.head) < 0 } end end |