Backend Realm

Backend Realm

Dealing with lru_cache While Testing Django Applications

Feb 27, 20218 min read

lru_cache is the simplest method of caching expensive function calls. It's hassle-free and it doesn't need a backend (such as Redis). But there's a gotcha when testing your application. Data could leak from a test case to another since they are cache...