authenticator.py
14 KB
-
refactor: ensure garbage collection of objects using lru cache · dba8df11
Decorating class instances methods using `lru_cache` prevents garbage collection to happen when an object gets deleted. This could be really bad for memory consumption. Some resources about this: - https://rednafi.github.io/reflections/dont-wrap-instance-methods-with-functoolslru_cache-decorator-in-python.html - https://www.youtube.com/watch?v=sVjtp6tGo0g Originally spotted by rule `B019` of `flake8-bugbear`.
Mathieu Kniewallner committed