write behind question

classic Classic list List threaded Threaded
3 messages Options
kevin.zheng kevin.zheng
Reply | Threaded
Open this post in threaded view
|

write behind question

Hi there,

I have one scenario that I need to make sure changes inside the cache need to be persisted before I do some other sql queries to database.

However when the cache is in “write behind” mode, I am not sure whether all data has been updated. So, is there any way to persist the date before calling sql to the database?

 

 

Best regards,

Kevin

vdpyatkov vdpyatkov
Reply | Threaded
Open this post in threaded view
|

Re: write behind question

Hello,

I think you need to use Ignite Cache.load Cache().

On Fri, May 27, 2016 at 6:33 AM, Zhengqingzheng <[hidden email]> wrote:

Hi there,

I have one scenario that I need to make sure changes inside the cache need to be persisted before I do some other sql queries to database.

However when the cache is in “write behind” mode, I am not sure whether all data has been updated. So, is there any way to persist the date before calling sql to the database?

 

 

Best regards,

Kevin




--
Vladislav Pyatkov
vdpyatkov vdpyatkov
Reply | Threaded
Open this post in threaded view
|

Re: write behind question

Hello,

Oh, I incorrectly understood you.
You can look at Write-Through[1]. This means that every path to the cache will be written to the vault (synchronously).

In addition, you can perform SQL directly on Ignite[2].


On Fri, May 27, 2016 at 10:13 AM, Vladislav Pyatkov <[hidden email]> wrote:
Hello,

I think you need to use Ignite Cache.load Cache().

On Fri, May 27, 2016 at 6:33 AM, Zhengqingzheng <[hidden email]> wrote:

Hi there,

I have one scenario that I need to make sure changes inside the cache need to be persisted before I do some other sql queries to database.

However when the cache is in “write behind” mode, I am not sure whether all data has been updated. So, is there any way to persist the date before calling sql to the database?

 

 

Best regards,

Kevin




--
Vladislav Pyatkov



--
Vladislav Pyatkov