Class: Idempo::MemoryBackend
- Inherits:
-
Object
- Object
- Idempo::MemoryBackend
- Defined in:
- lib/idempo/memory_backend.rb
Defined Under Namespace
Classes: Store
Instance Method Summary collapse
-
#initialize ⇒ MemoryBackend
constructor
A new instance of MemoryBackend.
- #prune! ⇒ Object
- #with_idempotency_key(request_key) ⇒ Object
Constructor Details
#initialize ⇒ MemoryBackend
Returns a new instance of MemoryBackend.
2 3 4 5 6 7 |
# File 'lib/idempo/memory_backend.rb', line 2 def initialize require_relative "response_store" @lock = Idempo::MemoryLock.new @response_store = Idempo::ResponseStore.new @store_mutex = Mutex.new end |
Instance Method Details
#prune! ⇒ Object
30 31 32 |
# File 'lib/idempo/memory_backend.rb', line 30 def prune! @response_store.prune end |