Sorry, my bad. Here’s the method. Basically I am directly invoking the
Ignition.ignite() with expiry policy.
public static Cache getOrCreateCache(String name, Factory factory)
{
CacheConfiguration cc = newCacheConfig(name);
cc.setExpiryPolicyFactory(factory);
cc.setStatisticsEnabled(true);
return Ignition.ignite().getOrCreateCache(cc);
}
From: Denis Mekhanikov [mailto:dmekhani...@gmail.com]
Sent: Wednesday, August 29, 2018 10:37 AM
To: user@ignite.apache.org
Subject: Re: Can Ignite.getOrCreateCache(CacheConfiguration) return null ?
This email is from an external source - exercise caution regarding links and
attachments. Please visit cybersecurity.fmr.com/phishing/ to learn more.
What does the getOrCreateCache method do internally?
Denis
ср, 29 авг. 2018 г. в 5:52, HEWA WIDANA GAMAGE, SUBASH
mailto:subash.hewawidanagam...@fmr.com>>:
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 cache =
getOrCreateCache(CACHE_NAME,CreatedExpiryPolicy.factoryOf(new
Duration(TimeUnit.SECONDS, 300)));