0

I know "write-through" means the write is committed only if DB write and cache write are both good. However below statement confused me

"rite-through cache is good for applications that write and then re-read data frequently as data is stored in cache and results in low read latency"

I think This pattern has to write 2 layer, which would lead to higher write latency. How could this be good for write-frequent application.

nathan
  • 754
  • 1
  • 10
  • 24

1 Answers1

0

When you are using write-through as writing policy, you make sure that on either write misses or write hits, main memory keeps updated with correct values. As you said , if an application writes and then re-reads some data frequently, part of this data could stay in cache memory, which would result in less misses overall.

However, this is not an absolute truth at all, due to the fact that both CPU and memory performance depend on several factors and cannot be measured by testing just one program or application.

Hope this helps!

cmelnu
  • 11
  • 1
  • 8