Even if you don't use a preexisting cache, a proper caching class that gets instantiated and injected would ease testing concerns, make thread safety easier to reason about, loosen coupling, and just all around be better.