Skip to content

Commit

Permalink
fix(cache): cast common options for memcached cache
Browse files Browse the repository at this point in the history
  • Loading branch information
anehx committed Dec 10, 2024
1 parent baaedf3 commit 59f1727
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion document_merge_service/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,21 @@ def default(default_dev=env.NOTSET, default_prod=env.NOTSET):
"CACHE_BACKEND", default="django.core.cache.backends.locmem.LocMemCache"
),
"LOCATION": env.str("CACHE_LOCATION", default=""),
"OPTIONS": env.dict("CACHE_OPTIONS", default={}),
"OPTIONS": env.dict(
"CACHE_OPTIONS",
default={},
cast={
"value": str,
# Common options for PyMemcacheCache which need to have the
# proper datatype in order to work
"cast": {
"connect_timeout": float,
"timeout": float,
"no_delay": bool,
"ignore_exc": bool,
},
},
),
}
}

Expand Down

0 comments on commit 59f1727

Please sign in to comment.