lib/cacheflow/redis.rb in cacheflow-0.3.0 vs lib/cacheflow/redis.rb in cacheflow-0.3.1
- old
+ new
@@ -50,12 +50,11 @@
end
end
if defined?(RedisClient)
RedisClient.register(Cacheflow::Redis::ClientNotifications)
-end
-
-if Redis::VERSION.to_i < 5
+elsif defined?(Redis)
+ # redis < 5
Redis::Client.prepend(Cacheflow::Redis::Notifications)
end
Cacheflow::Redis::Instrumenter.attach_to(:redis)