Member-only story
Considerations when using Cache
The cache is the local store where we store frequently accessed data. Caching is storing copies of frequently used application data in a layer of smaller, faster memory to improve data retrieval times, throughput, and compute costs.

Now Cache is not an option but common everywhere. The developer doesn’t even understand how the cache works but uses it as part of basic architecture. I found the case that the system has a cache but the server never touches the cache. (It just exists…)
Therefore, I would write this for engineers to explain why we need the cache and what points need to be reviewed.
Considerations
(1) Your system really needs a cache? The cache is required when the data is less frequently refreshed but referred to frequently.
(2) Which data should be in Cache: Cache stores the data in the volatile memory, if you need the permanent storage, you should make the actual database to store it permanently.
(3) Consistency: Consistency is referred whether the data is in Cache and the original data is consistent. For instance, Azure CDN provides services like caching rules, cache expiration, query string caching, and cache bypass functions to ensure the consistency level will be tailored based on the requirements of the system.