https://bytebypython.de/optimizing-code-with-pythons-lru-cache/