Sha256: 34bc65b9c7faa3f19a259ee0294b16fa8992b150d8c44f9ec16a7fb0f5569df1
Contents?: true
Size: 761 Bytes
Versions: 12
Compression:
Stored size: 761 Bytes
Contents
module Picky module Backends class Redis class String < Basic # Writes the hash into Redis. # # Note: We could use multi, but it did not help. # def dump hash clear hash.each_pair do |key, value| client.hset namespace, key, value end end # Clears the hash. # def clear client.del namespace end # Get a single value. # # Internal API method for the index. # def [] key client.hget namespace, key end # Set a single value # def []= key, value client.hset namespace, key, value end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems