cfg.persistence().stores().get(0).purgeOnStartup(purge);
return cfg;
}
private void assertCacheEntry(Cache cache, String key, String value, long lifespanMillis, long maxIdleMillis) {
DataContainer dc = cache.getAdvancedCache().getDataContainer();
InternalCacheEntry ice = dc.get(key);
assertNotNull(ice);
assertEquals(value, unwrap(ice.getValue()));
assertEquals(lifespanMillis, ice.getLifespan());
assertEquals(maxIdleMillis, ice.getMaxIdle());
if (lifespanMillis > -1) assert ice.getCreated() > -1 : "Lifespan is set but created time is not";