The typical way to define the eviction policy would be:
cache.setEvictionPolicyFactory(new LruEvictionPolicyFactory<>(10_000));
To use a lambda, you’d need to deploy the code to the server nodes in advance.

Regards,
Stephen

> On 3 Nov 2021, at 10:02, Vikram Pancholi <vikram.panch...@gmail.com> wrote:
> 
> Have you tried to implement the eviction policy injection without using 
> lambda ?
> Also in the cache definitions that work well are you using the same pattern 
> to set the eviction policy ?
> 
> Regards
> Vikram Pancholi
> 
>> On 3 Nov 2021, at 10.57, Gurmehar Kalra <gurmehar.ka...@hcl.com 
>> <mailto:gurmehar.ka...@hcl.com>> wrote:
>> 
>>  cache.setEvictionPolicyFactory(()-> lruEvictionPolicy);
> 


Reply via email to