1

I am having great speed up using flask-cache configured to work with a redis-server instance. However, if the redis-server becomes unavailable I get an error message:

redis.exceptions.ConnectionError
ConnectionError: Error 111 connecting to localhost:6379. Connection refused.

Since chaching is just to increase performance I would like to configure a fallback (slower) CACHE_TYPE (e.g., simple) to deal with redis-server problems without affecting flask functionalities. If not possible I hope to dinamically-programmatically disable the cache to prevent any flask error.

EDIT

I tried to solve the problem on my own: https://github.com/paolinux79/flask-cache

Paolinux
  • 167
  • 1
  • 8
  • Why not think of the other options? Why not establish a redis cluster to prevent failure? Ideally, you would want to remove any single-point-of-failures. http://redis.io/topics/cluster-tutorial – Carlos Mar 23 '15 at 17:30
  • Hey Carlos, I think that redis is a great nosql ultrafast db but redis-cluster is, imho, far away from being a real cluster (like riak for example). – Paolinux Mar 24 '15 at 07:57

0 Answers0