Decide what to cache
Before adding a cache, be able to say what goes stale.
This is slow: <describe the operation and roughly how slow> Before adding a cache, tell me honestly: is caching the right fix here, or am I hiding a query I should just make faster? If caching is right: - What exactly gets cached, keyed by what. - How long it lives, and what specifically invalidates it early. - What a user sees if they get stale data — is that acceptable?
The hard part of caching was never the storing. It is knowing when what you stored stopped being true.