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 <[email protected]> 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 <[email protected] >> <mailto:[email protected]>> wrote: >> >> cache.setEvictionPolicyFactory(()-> lruEvictionPolicy); >
