Product Documentation : Ehcache Developer Guide : Cache Usage Patterns : write-through
The write-through pattern mimics the structure of the cache-aside pattern when writing data. The difference is that you must implement the CacheWriter interface and configure the cache for write-through mode.
A write-through cache writes data to the system-of-record in the same thread of execution. Therefore, in the common scenario of using a database transaction in context of the thread, the write to the database is covered by the transaction in scope. For more details (including configuration settings) about using the write-through pattern, see Write-Through and Write-Behind Caches.
Copyright © 2010-2015 Software AG, Darmstadt, Germany.

Product Logo |   Feedback