SelfPopulatingCache in Ehcache 3.2

869 Views Asked by At

SelfPopulatingCache is available in Ehcache version 2.8 but not in version 3.2. Is there something that gives the same functionality in version 3.2?

1

There are 1 best solutions below

1
On

Ehcache 3.x does not reproduce this concept directly.

However you can perfectly achieve the same result by using a CacheLoaderWriter. Simply ignore the write-through part by having no-op implementations and implement the load and loadAll method to perform the logic you find in the Ehcache 2.x CacheEntryFactory.