What's the best way to implement python cache for better performance? or How does python cache work a

18 Replies, 1729 Views

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.

Messages In This Thread



Users browsing this thread: 1 Guest(s)