10 Comments
User's avatar
Kevin Naughton Jr.'s avatar

congrats on 150k Neo! :)

Neo Kim's avatar

hey, thanks Kevin

Raul Junco's avatar

Cache is probably the closest thing we have to a silver bullet.

But only if you're willing to aim it carefully, invalidation is still hard.

Good breakdown, Neo.

AnthonyTran's avatar

Hi Neo, thank you for the very helpful article. But I wonder in the write through strategy, how can a cache help us to write data to the DB directly on behalf of our app? (Let’s say I have an API with nodejs, redis as cache db, and mysql for db, how can redis write data to mysql db without an intervention of nodejs logic?)

veer0x1's avatar

I guess Neo mistakenly written that cache writes to database, but what I have read in other articles related to Write Through Cache Strategy is that your application writes to both cache and database, thats why it’s recommended where number of write operations are less.

AnthonyTran's avatar

Nice, man. Thank you for the explanation 🙌

Rakesh B's avatar

What is difference between write around strategy and cache aside strategy. To me both follows same approach.

Ganesh Busam's avatar

Thanks for clear visuals, Kim. But I couldn't find the difference between Cache Aside strategy and Write-Around strategy. Both are first checking if the data exists in cache. If cache miss, then fetching the data from the database and writing it to cache.

Marcos F. Lobo 🗻🧭's avatar

Not sure if I see the difference between "Cache Aside Strategy" and "Read through Strategy".

¿What are the main differences?