If no entry for the object exists in the cache then it will invoke the {@link CacheableObjectProvider} associated with the cache.
128129130131132133134135136137138
async.update(result); CacheableObjectProvider cacheableObjectProvider = new ExpiredObjectsRemainExpiredCacheableObjectProvider(cache.getRootGroup()); assertNotNull("Integer object is retrievable via the cache", cache.retrieve(cacheKey, cacheableObjectProvider)); Thread.sleep(3000); // Slightly messy. // Done this way so that we don't get a NullPointerException, and have
147148149150151152153154155156157
// } catch (NullPointerException expected) { // // expected // } assertNull("object has expired from cache and the provider doesn't " + "put it back in", cache.retrieve(cacheKey, cacheableObjectProvider)); } /** * If the cached recording is up to date then initializeProcess should