title: flask caching - handle exception when redis service is down
body: <p>I have a simple code using flask:</p>
  
  <pre><code>@app.route('/foo/&lt;arg&gt;')
  @app.cache.memoize()
  def foo_response(arg):
      return 'Hello ' + arg
  </code></pre>
  
  <p>This is working great while my redis server (cache server) is up.</p>
  
  <p>If the redis server goes down, an exception is raised every time I query <code>/foo/&lt;arg&gt;</code>, which is understandable.</p>
  
  <p>How (and where) can I handle that exception (à la try-except) in order to not use the redis server if it is down at that moment?</p>