Sha256: 05f9c28d993805766ec0288434e2d1e1839f6fcae5eb6e8188e1ae2d51972015
Contents?: true
Size: 418 Bytes
Versions: 15
Compression:
Stored size: 418 Bytes
Contents
module Isomorfeus class ThreadLocalCache def initialize Thread.current[:local_cache] = {} unless Thread.current.key?(:local_cache) end def [](key) Thread.current[:local_cache][key] end alias fetch [] def []=(key, value) Thread.current[:local_cache][key] = value end alias store []= def key?(key) Thread.current[:local_cache].key?(key) end end end
Version data entries
15 entries across 15 versions & 1 rubygems