lib/picky/internals/index/redis/string_hash.rb in picky-2.5.1 vs lib/picky/internals/index/redis/string_hash.rb in picky-2.5.2

- old
+ new

@@ -9,13 +9,19 @@ # Writes the hash into Redis. # # Note: We could use multi, but it did not help. # def dump hash - redis = backend + clear hash.each_pair do |key, value| - redis.hset namespace, key, value + backend.hset namespace, key, value end + end + + # Clears the hash. + # + def clear + backend.del namespace end # Get a collection. # def collection sym \ No newline at end of file