Sha256: e6741e3f0ff6610bc0d048a7ff040234ecfc29906c21b1304085fd27af30ac0b
Contents?: true
Size: 363 Bytes
Versions: 3
Compression:
Stored size: 363 Bytes
Contents
require 'adapter' module Adapter module Memory def read(key) decode(client[key_for(key)]) end def write(key, value) client[key_for(key)] = encode(value) end def delete(key) read(key).tap { client.delete(key_for(key)) } end def clear client.clear end end end Adapter.define(:memory, Adapter::Memory)
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
adapter-0.5.2 | lib/adapter/memory.rb |
adapter-0.5.1 | lib/adapter/memory.rb |
adapter-0.5 | lib/adapter/memory.rb |