Announcing Dash Bio 1.0.0 🎉 : a one-stop-shop for bioinformatics and drug development visualizations.

Server side caching using redis

Hello!

I am trying to replicate example 4 in this part of the documentation, using redis cache instead. I am not exactly sure how to configure the cache properly. Assuming that I have my redis DB set up, is it enough to add:

cache = Cache(app.server, config={
    'CACHE_TYPE': 'redis',
    'CACHE_REDIS_URL': 'redis://{}:{}'.format(REDIS_HOST, REDIS_PORT),
    'CACHE_DEFAULT_TIMEOUT': 450
})

What happens with CACHE_THRESHOLD? Is this not necessary? (reading the flask cache documentation it seems like this parameter is not used for redis).

1 Like