# Overview
In a write-back cache... #flashcard
Initially, the data is only written into the cache. As data is ready to be removed from the cache, based on the selected [[caching policy]], it is written to the database.
<!--ID: 1751507776570-->
## Diagram
![[Write-back Cache 2024-12-19 09.26.47.excalidraw.svg]]
%%[[Write-back Cache 2024-12-19 09.26.47.excalidraw|🖋 Edit in Excalidraw]]%%
# Key Considerations
This approach requires the use of a [[dirty bit]].
# Pros
The pros of write-back cache include: #flashcard
- Reduces the number of writes against a database, thus improving performance
<!--ID: 1751507776572-->
# Cons
The cons of write-back cache include: #flashcard
- Can lose data if there is an issue with the cache before writing to the database
- Introduces complexity if also managing a [[dirty bit]]
<!--ID: 1751507776576-->
# Use Cases
The use cases for write-back cache are: #flashcard
- Heavy write work flows
<!--ID: 1751507776578-->
# Related Topics