Fwd: LOCAL CACHE MODE Configuration settings

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Fwd: LOCAL CACHE MODE Configuration settings

Valentin Kulichenko
Igniters,

While investigating this issue reported by user, I noticed that LOCAL cache
is fully destroyed when close() is called, which is inconsistent with other
cache modes. Is there any reason for this?

-Val

---------- Forwarded message ----------
From: vkulichenko <[hidden email]>
Date: Tue, Nov 10, 2015 at 3:03 PM
Subject: Re: LOCAL CACHE MODE Configuration settings
To: [hidden email]


This happens because you use try-with-resources statement and therefore
close
the cache after populating it:

try (IgniteCache<String, Object> myCache =
Ignition.ignite().getOrCreateCache("MY_CACHE")) {
    ...
}

Local cache is completely destroyed in this case, while partitioned just
closes the current cache reference. I'm not sure why it's implemented this
way and I will start a discussion on dev@.

But anyway, just avoid closing the cache unless you want to destroy it and
it will work for you.

-Val



--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/LOCAL-CACHE-MODE-Configuration-settings-tp1875p1922.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.