Sorry, my bad. Here’s the method. Basically I am directly invoking the Ignition.ignite() with expiry policy.


public static <K, V> Cache<K, V> getOrCreateCache(String name, Factory factory) {
K, V> cc = newCacheConfig(name);
return Ignition.ignite().<K, V>getOrCreateCache(cc);




From: Denis Mekhanikov []
Sent: Wednesday, August 29, 2018 10:37 AM
Subject: Re: Can Ignite.getOrCreateCache(CacheConfiguration) return null ?


This email is from an external source - exercise caution regarding links and attachments. Please visit to learn more.


What does the getOrCreateCache method do internally?




ср, 29 авг. 2018 г. в 5:52, HEWA WIDANA GAMAGE, SUBASH <>:

Hi all,

Is there any possibility for this to happen ? We’re using Ignite 1.9.0


Following is the code we use to obtain the cache. And we call this line for every cache operation(unintentionally), but wanted to know if following line can return a null cache instance under any circumstance.


Cache<String, String> cache = getOrCreateCache(CACHE_NAME,CreatedExpiryPolicy.factoryOf(new Duration(TimeUnit.SECONDS, 300)));