lib/splitclient-rb/cache/adapters/redis_adapter.rb in splitclient-rb-4.2.2 vs lib/splitclient-rb/cache/adapters/redis_adapter.rb in splitclient-rb-4.3.0.canary.1
- old
+ new
@@ -136,9 +136,15 @@
def pipelined(&block)
@redis.pipelined do
block.call
end
end
+
+ def clear(prefix)
+ keys = @redis.keys("#{prefix}*")
+
+ keys.map { |key| @redis.del(key) }
+ end
end
end
end
end