You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by John Smith <ja...@gmail.com> on 2019/05/22 20:53:46 UTC

Which cache gets expiry policy when creating near cache?

Hi, when we use ignite getOrCreateNearCache().withExpirePolicy()

Will the expire policy be set on the underlying cache or the near cache?

Re: Which cache gets expiry policy when creating near cache?

Posted by John Smith <ja...@gmail.com>.
Thanks

On Fri, 24 May 2019 at 05:56, Ilya Kasnacheev <il...@gmail.com>
wrote:

> Hello!
>
> Actually I have checked the source, and I don't see much difference.
> You're getting a reference to 'publicJCache' either way. This means that
> `withExpiryPolicy` will affect the "far" cache in both cases.
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> чт, 23 мая 2019 г. в 19:05, John Smith <ja...@gmail.com>:
>
>> Also is there a difference between these two?
>>
>> ignite.getOrCreateCache(cacheConfig, nearConfig).withExpiryPolicy();
>>
>> AND
>>
>> ignite.getOrCreateNearCache(name, nearConfig).withExpiryPolicy();
>>
>>
>>
>>
>>
>> On Thu, 23 May 2019 at 11:27, Ilya Kasnacheev <il...@gmail.com>
>> wrote:
>>
>>> Hello!
>>>
>>> Yes, I guess so.
>>>
>>> Regards,
>>> --
>>> Ilya Kasnacheev
>>>
>>>
>>> чт, 23 мая 2019 г. в 17:53, John Smith <ja...@gmail.com>:
>>>
>>>> So then I should create my regular cache first... Set the expiry policy
>>>> on that and then create near cache on top of that?
>>>>
>>>> On Thu, 23 May 2019 at 08:48, Ilya Kasnacheev <
>>>> ilya.kasnacheev@gmail.com> wrote:
>>>>
>>>>> Hello!
>>>>>
>>>>> It will be set on the cache proxy returned by withExpirePolicy()
>>>>> method (and will be applied to near cache, I guess, if this is implemented
>>>>> at all)
>>>>>
>>>>> Regards,
>>>>> --
>>>>> Ilya Kasnacheev
>>>>>
>>>>>
>>>>> чт, 23 мая 2019 г. в 00:18, John Smith <ja...@gmail.com>:
>>>>>
>>>>>> Hi, when we use ignite getOrCreateNearCache().withExpirePolicy()
>>>>>>
>>>>>> Will the expire policy be set on the underlying cache or the near
>>>>>> cache?
>>>>>>
>>>>>

Re: Which cache gets expiry policy when creating near cache?

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

Actually I have checked the source, and I don't see much difference. You're
getting a reference to 'publicJCache' either way. This means that
`withExpiryPolicy` will affect the "far" cache in both cases.

Regards,
-- 
Ilya Kasnacheev


чт, 23 мая 2019 г. в 19:05, John Smith <ja...@gmail.com>:

> Also is there a difference between these two?
>
> ignite.getOrCreateCache(cacheConfig, nearConfig).withExpiryPolicy();
>
> AND
>
> ignite.getOrCreateNearCache(name, nearConfig).withExpiryPolicy();
>
>
>
>
>
> On Thu, 23 May 2019 at 11:27, Ilya Kasnacheev <il...@gmail.com>
> wrote:
>
>> Hello!
>>
>> Yes, I guess so.
>>
>> Regards,
>> --
>> Ilya Kasnacheev
>>
>>
>> чт, 23 мая 2019 г. в 17:53, John Smith <ja...@gmail.com>:
>>
>>> So then I should create my regular cache first... Set the expiry policy
>>> on that and then create near cache on top of that?
>>>
>>> On Thu, 23 May 2019 at 08:48, Ilya Kasnacheev <il...@gmail.com>
>>> wrote:
>>>
>>>> Hello!
>>>>
>>>> It will be set on the cache proxy returned by withExpirePolicy() method
>>>> (and will be applied to near cache, I guess, if this is implemented at all)
>>>>
>>>> Regards,
>>>> --
>>>> Ilya Kasnacheev
>>>>
>>>>
>>>> чт, 23 мая 2019 г. в 00:18, John Smith <ja...@gmail.com>:
>>>>
>>>>> Hi, when we use ignite getOrCreateNearCache().withExpirePolicy()
>>>>>
>>>>> Will the expire policy be set on the underlying cache or the near
>>>>> cache?
>>>>>
>>>>

Re: Which cache gets expiry policy when creating near cache?

Posted by John Smith <ja...@gmail.com>.
Also is there a difference between these two?

ignite.getOrCreateCache(cacheConfig, nearConfig).withExpiryPolicy();

AND

ignite.getOrCreateNearCache(name, nearConfig).withExpiryPolicy();





On Thu, 23 May 2019 at 11:27, Ilya Kasnacheev <il...@gmail.com>
wrote:

> Hello!
>
> Yes, I guess so.
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> чт, 23 мая 2019 г. в 17:53, John Smith <ja...@gmail.com>:
>
>> So then I should create my regular cache first... Set the expiry policy
>> on that and then create near cache on top of that?
>>
>> On Thu, 23 May 2019 at 08:48, Ilya Kasnacheev <il...@gmail.com>
>> wrote:
>>
>>> Hello!
>>>
>>> It will be set on the cache proxy returned by withExpirePolicy() method
>>> (and will be applied to near cache, I guess, if this is implemented at all)
>>>
>>> Regards,
>>> --
>>> Ilya Kasnacheev
>>>
>>>
>>> чт, 23 мая 2019 г. в 00:18, John Smith <ja...@gmail.com>:
>>>
>>>> Hi, when we use ignite getOrCreateNearCache().withExpirePolicy()
>>>>
>>>> Will the expire policy be set on the underlying cache or the near cache?
>>>>
>>>

Re: Which cache gets expiry policy when creating near cache?

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

Yes, I guess so.

Regards,
-- 
Ilya Kasnacheev


чт, 23 мая 2019 г. в 17:53, John Smith <ja...@gmail.com>:

> So then I should create my regular cache first... Set the expiry policy on
> that and then create near cache on top of that?
>
> On Thu, 23 May 2019 at 08:48, Ilya Kasnacheev <il...@gmail.com>
> wrote:
>
>> Hello!
>>
>> It will be set on the cache proxy returned by withExpirePolicy() method
>> (and will be applied to near cache, I guess, if this is implemented at all)
>>
>> Regards,
>> --
>> Ilya Kasnacheev
>>
>>
>> чт, 23 мая 2019 г. в 00:18, John Smith <ja...@gmail.com>:
>>
>>> Hi, when we use ignite getOrCreateNearCache().withExpirePolicy()
>>>
>>> Will the expire policy be set on the underlying cache or the near cache?
>>>
>>

Re: Which cache gets expiry policy when creating near cache?

Posted by John Smith <ja...@gmail.com>.
So then I should create my regular cache first... Set the expiry policy on
that and then create near cache on top of that?

On Thu, 23 May 2019 at 08:48, Ilya Kasnacheev <il...@gmail.com>
wrote:

> Hello!
>
> It will be set on the cache proxy returned by withExpirePolicy() method
> (and will be applied to near cache, I guess, if this is implemented at all)
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> чт, 23 мая 2019 г. в 00:18, John Smith <ja...@gmail.com>:
>
>> Hi, when we use ignite getOrCreateNearCache().withExpirePolicy()
>>
>> Will the expire policy be set on the underlying cache or the near cache?
>>
>

Re: Which cache gets expiry policy when creating near cache?

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

It will be set on the cache proxy returned by withExpirePolicy() method
(and will be applied to near cache, I guess, if this is implemented at all)

Regards,
-- 
Ilya Kasnacheev


чт, 23 мая 2019 г. в 00:18, John Smith <ja...@gmail.com>:

> Hi, when we use ignite getOrCreateNearCache().withExpirePolicy()
>
> Will the expire policy be set on the underlying cache or the near cache?
>