Method: AsyncStorage::Allocator#invalidate!

Defined in:
lib/async_storage/allocator.rb

#invalidate!Boolean

Delete object with a given key.

Returns:

  • (Boolean)

    True or False according to the object existence



89
90
91
92
93
94
95
96
97
98
# File 'lib/async_storage/allocator.rb', line 89

def invalidate!
  breaker.run(fallback: -> { false }) do
    connection do |redis|
      redis.multi do |cli|
        cli.del(naming.body)
        cli.del(naming.head)
      end.include?(1)
    end
  end
end