You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by monstereo <me...@gmail.com> on 2018/08/14 10:56:55 UTC

Eviction Policy on Dirty data

Let's say, I have cache in ignite.
And one data is dirty(I mean, i have to upload correspond database for this
data)
Before updating, let's say I added one element to the cache and eviction
policy occured(and dirty data will be removed).

is there any mechanism to prevent eviction of dirty data before updating
correspond database?
or
this situation never becomes?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

RE: Eviction Policy on Dirty data

Posted by Stanislav Lukyanov <st...@gmail.com>.
With writeThrough an entry in the cache will never be "dirty" in that sense - cache store will update the backing DB at the same time the cache update happens.

From: monstereo
Sent: 14 августа 2018 г. 22:39
To: user@ignite.apache.org
Subject: Re: Eviction Policy on Dirty data

yes, using cachestore and write through

dkarachentsev wrote
> Hi,
> 
> Could you please explain how do you update database? Do you use CacheStore
> with writeThrough or manually save?
> 
> Anyway, you can update data with custom eviction policy:
> cache.withExpiryPolicy(policy) [1]
> 
> [1]
> https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/IgniteCache.html#withExpiryPolicy-javax.cache.expiry.ExpiryPolicy-
> 
> Thanks!
> -Dmitry
> 
> 
> 
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Eviction Policy on Dirty data

Posted by monstereo <me...@gmail.com>.
yes, using cachestore and write through

dkarachentsev wrote
> Hi,
> 
> Could you please explain how do you update database? Do you use CacheStore
> with writeThrough or manually save?
> 
> Anyway, you can update data with custom eviction policy:
> cache.withExpiryPolicy(policy) [1]
> 
> [1]
> https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/IgniteCache.html#withExpiryPolicy-javax.cache.expiry.ExpiryPolicy-
> 
> Thanks!
> -Dmitry
> 
> 
> 
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Eviction Policy on Dirty data

Posted by dkarachentsev <dk...@gridgain.com>.
Hi,

Could you please explain how do you update database? Do you use CacheStore
with writeThrough or manually save?

Anyway, you can update data with custom eviction policy:
cache.withExpiryPolicy(policy) [1]

[1]
https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/IgniteCache.html#withExpiryPolicy-javax.cache.expiry.ExpiryPolicy-

Thanks!
-Dmitry



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/