summaryrefslogtreecommitdiff
path: root/ishtar_common/utils.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2024-04-29 18:43:36 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2024-04-30 11:17:10 +0200
commit68190548376cd951d9e0466f385afd7ee94a5256 (patch)
tree0ae0f380fad9cc24b3380e11fc1948acf0000e71 /ishtar_common/utils.py
parent8b2a8e8aff6f2143a9ae0eb266a6c34c19591b46 (diff)
downloadIshtar-68190548376cd951d9e0466f385afd7ee94a5256.tar.bz2
Ishtar-68190548376cd951d9e0466f385afd7ee94a5256.zip
✨ templates: get containers values from the operation - performance: add cache (refs #5927)
Diffstat (limited to 'ishtar_common/utils.py')
-rw-r--r--ishtar_common/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py
index 92059c195..d55687cd7 100644
--- a/ishtar_common/utils.py
+++ b/ishtar_common/utils.py
@@ -687,7 +687,7 @@ def get_cache(cls, extra_args=tuple(), app_label=None):
if len(cache_key) >= 250:
# nosec: used for a cache key no consequence if predictable
m = hashlib.md5() # nosec
- m.update(cache_key)
+ m.update(cache_key.encode("utf-8"))
cache_key = m.hexdigest()
return cache_key, cache.get(cache_key)