Skip to content

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 so 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.

Merge request reports