💻 Tech
While I was reading about different caching strategies, two of them caught my attention: cache-aside and read-through. Both of them are used to improve the performance of the system by caching the data. But they have different approaches to achieve the same goal. Cache-aside strategy is the responsibility of the application layer while read-through is the responsibility of the cache or data layer. The former gives more control to the application with its business logic but makes caching more complex. The latter is simpler, and caching is transparent to the application, but it has less control over the data, meaning it is a straightforward cache and doesn’t have the ability to manipulate the data before caching it.