Vishal Sharma
Vishal Sharma

Reputation: 1750

Write Behind and Write Through

Persistence write occurs in two modes in Ignite: Write through and Write Behind. I want to set it to Write Behind but am confused from the example given here. In the example provided, the user has set both as true i.e.

configuration.setWriteThrough(true);
        configuration.setWriteBehindEnabled(true);

Shouldn't it be only configuration.setWriteBehindEnabled(true);?

Upvotes: 0

Views: 134

Answers (1)

Valentin Kulichenko
Valentin Kulichenko

Reputation: 8390

setWriteThrough(true) enables the CacheStore integration altogether. Without setting this property, CacheStore is never touched on updates. If you want to use write-behind mode, you need to set setWriteBehindEnabled(true) in addition to that.

Upvotes: 2

Related Questions