I’ve been burned by python cache before—cached a function that depended on a global variable. Big oof.
Now I only use it for pure functions. If you need more control, check out `cachetools` lib. It’s got TTL and other fancy features.
Side note: logging cache hits/misses can help debug weird behavior.
Now I only use it for pure functions. If you need more control, check out `cachetools` lib. It’s got TTL and other fancy features.
Side note: logging cache hits/misses can help debug weird behavior.
