Menu
Back to Discussions

Cache Write Strategies: Write-Through versus Write-Behind?

Nargiza Urazbekova
Nargiza Urazbekova
·3927 views
hey everyone, i've been thinking about how we handle writes when caching is involved. write-through makes sure data is consistent, writing to both the cache and the database at the same time, but it can be kinda slow. write-behind, on the other hand, is faster because it writes to the cache first and then later to the database, but you might lose data if the cache crashes. what have you guys seen work best. when did you find one was a better choice than the other in a microservices setup. any specific problems you've bumped into
30 comments

Comments

Loading comments...