Skip to content
Snippets Groups Projects
Commit 2c620705 authored by Antoine Lambert's avatar Antoine Lambert
Browse files

utils: Use repeatable hashing in django_cache wrapper

Previous implementation was using the builtin hash function but
it is seeded with a random seed, so the cache keys were completely
random across processes and webapp django cache was not shared across
gunicorn workers in production and staging environment.

Use hashlib.md5(usedforsecurity=False) instead, which is a cheap,
repeatable and short hash function.

Related to #4782
parent 2e11bae7
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment