# Overview
A write-through cache is when... #flashcard
the data is written to the cache and database simultaneously:
1. Application writes to cache
2. Cache writes to DB
<!--ID: 1751507776564-->
## Diagram
![[Write-through Cache 2024-12-19 09.08.25.excalidraw.svg]]
%%[[Write-through Cache 2024-12-19 09.08.25.excalidraw|🖋 Edit in Excalidraw]]%%
# Key Considerations
# Pros
- [[Consistency]]
# Cons
The cons of the write-through cache are... #flashcard
- More expensive due to all data being stored in the cache at some point
- Slower performance for write operations
<!--ID: 1751507776567-->
# Use Cases
- When data consistency is important
# Related Topics