Update Hazelcast cache instead of flushing it

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

Update Hazelcast cache instead of flushing it

Patrick Duflot
Hello all,

I wanted to know wether it is possible to update an Hazelcast cache bound the a MyBatis namespace.

So, instead of flushing the cache in update queries, I would put the new object version in the cache and then update the database.

Is it possible to do this through MyBatis configuration only?
Is it possible to get a reference to the underlying cache and update it before calling MyBatis?
Am I doing something stupid?

Best,

Patrick

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Update Hazelcast cache instead of flushing it

Iwao AVE!
Hi Patrick,

There was a discussion about getting a reference to the underlying cache.
https://groups.google.com/d/msg/mybatis-user/RR1ct8mih3w/UxbT_Zp4DYwJ

Although it is unclear what you are trying to achieve, it's unlikely
that manually updating MyBatis' 2nd level cache is the best solution.
Have you considered maintaining the cache outside MyBatis?

Regards,
Iwao

On Tue, Aug 14, 2018 at 6:14 PM Patrick Duflot <[hidden email]> wrote:

>
> Hello all,
>
> I wanted to know wether it is possible to update an Hazelcast cache bound the a MyBatis namespace.
>
> So, instead of flushing the cache in update queries, I would put the new object version in the cache and then update the database.
>
> Is it possible to do this through MyBatis configuration only?
> Is it possible to get a reference to the underlying cache and update it before calling MyBatis?
> Am I doing something stupid?
>
> Best,
>
> Patrick
>
> --
> You received this message because you are subscribed to the Google Groups "mybatis-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Update Hazelcast cache instead of flushing it

Patrick Duflot
Hello,

Yes, so I will maintain the cache outside MyBatis.
Thanks for your reply.

Patrick
On Mon, Aug 27, 2018 at 3:47 PM Iwao AVE! <[hidden email]> wrote:

>
> Hi Patrick,
>
> There was a discussion about getting a reference to the underlying cache.
> https://groups.google.com/d/msg/mybatis-user/RR1ct8mih3w/UxbT_Zp4DYwJ
>
> Although it is unclear what you are trying to achieve, it's unlikely
> that manually updating MyBatis' 2nd level cache is the best solution.
> Have you considered maintaining the cache outside MyBatis?
>
> Regards,
> Iwao
>
> On Tue, Aug 14, 2018 at 6:14 PM Patrick Duflot <[hidden email]> wrote:
> >
> > Hello all,
> >
> > I wanted to know wether it is possible to update an Hazelcast cache bound the a MyBatis namespace.
> >
> > So, instead of flushing the cache in update queries, I would put the new object version in the cache and then update the database.
> >
> > Is it possible to do this through MyBatis configuration only?
> > Is it possible to get a reference to the underlying cache and update it before calling MyBatis?
> > Am I doing something stupid?
> >
> > Best,
> >
> > Patrick
> >
> > --
> > You received this message because you are subscribed to the Google Groups "mybatis-user" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups "mybatis-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.