Skip to content

Commit 7b90a87

Browse files
committed
Pass CACHE_OPTIONS as kwargs to redis_from_url
1 parent 494d498 commit 7b90a87

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: src/flask_caching/backends/rediscache.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ def factory(cls, app, config, args, kwargs):
8484

8585
redis_url = config.get("CACHE_REDIS_URL")
8686
if redis_url:
87-
kwargs["host"] = redis_from_url(redis_url, db=kwargs.pop("db", None))
87+
redis_kwargs = config.pop("CACHE_OPTIONS", {})
88+
kwargs["host"] = redis_from_url(redis_url, db=kwargs.pop("db", None), **redis_kwargs)
8889

8990
new_class = cls(*args, **kwargs)
9091

0 commit comments

Comments
 (0)