Sha256: c7c4d5ac5c7a27f8db73dd9252276d2cd0dc44e9bb9c089cfdfcde3470dff29a
Contents?: true
Size: 978 Bytes
Versions: 174
Compression:
Stored size: 978 Bytes
Contents
module ActiveSupport module Cache # Like MemoryStore, but thread-safe. class SynchronizedMemoryStore < MemoryStore def initialize super @guard = Monitor.new end def fetch(key, options = {}) @guard.synchronize { super } end def read(name, options = nil) @guard.synchronize { super } end def write(name, value, options = nil) @guard.synchronize { super } end def delete(name, options = nil) @guard.synchronize { super } end def delete_matched(matcher, options = nil) @guard.synchronize { super } end def exist?(name,options = nil) @guard.synchronize { super } end def increment(key, amount = 1) @guard.synchronize { super } end def decrement(key, amount = 1) @guard.synchronize { super } end def clear @guard.synchronize { super } end end end end
Version data entries
174 entries across 141 versions & 22 rubygems