It's not changing the default Expiry Policy, you will have a new Expiry
Policy as long as you use this "cache" object. withExpiryPolivy return
proxy with a new policy, so, all objects that were inserted using this
"cache" object, will have a new policy.

Evgenii

чт, 7 мая 2020 г. в 10:39, John Smith <[email protected]>:

> Ok cool. I create my cache using a template and the rest API, but when I
> start my application I do...
>
> cache = this.ignite.cache(this.cacheName)
>         .withExpiryPolicy(new ModifiedExpiryPolicy(new Duration(timeUnit, 
> this.cacheTtlDuration)));
>
> Can it be changed then at startup as am doing above?
>
> Or at this point I can only do cache.withExpiryPolicy(...).put(key, value);
>
>
> On Thu, 7 May 2020 at 13:31, Evgenii Zhuravlev <[email protected]>
> wrote:
>
>> Hi,
>>
>> There is no way to change the default policy for the already created
>> cache. The expiry policy can be changed for all operations on one cache
>> proxy object using withExpiryPolicy.
>>
>> Evgenii
>>
>> чт, 7 мая 2020 г. в 09:46, John Smith <[email protected]>:
>>
>>> Hi running 2.7.0
>>>
>>> I created a cache with ModifiedExpiryPolicy
>>>
>>> Can we change the policy of the created cache? I know we can do per
>>> write but can we change the default of the existing cache to another policy?
>>>
>>

Reply via email to