Member-only story
The 5 Caching Patterns You Should Know
If you’ve been in the industry for some time or you’re now trying to get in, I bet that the term caching
is familiar to you!
That’s because caching is utilized by many, if not all, companies to improve the application’s performance! How? 👇
How Caching Improves Performance? ⏩
Well, we have the normal storage of information - in a database, whether that’s MySQL, PostgreSQL, MongoDB or other DB provider. The ‘issue’ here is that when you save data to the DB, you are storing data to the disk.
With caching (Redis, Memcached, NGINX), you are storing the data in memory. Well.. that’s a whole lot faster to retrieve.
Look at the illustration below to gain a better understanding 👇 (The lesser the cycles, the faster the app)
So, caching is stored in memory for low latency. But memory is limited, so we need to utilize difference caching techniques or patterns in order to be smart with when do we need the data from DB or cache! 🧠