Class: RequestLocals::Cache

Inherits:
Concurrent::Map
  • Object
show all
Defined in:
lib/request_locals.rb

Overview

Internal: Cache that supports nested access by using a monitor instead of a mutex.

Instance Method Summary collapse

Constructor Details

#initialize(options = nil) ⇒ Cache

Returns a new instance of Cache.



36
37
38
39
# File 'lib/request_locals.rb', line 36

def initialize(options = nil)
  super(options)
  @write_lock = Monitor.new
end