You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by "Mitchell Rathbun (BLOOMBERG/ 731 LEX)" <mr...@bloomberg.net> on 2019/12/09 19:31:49 UTC
IgniteCache clear vs. removeAll
I am a little confused on the exact difference between clear and removeAll in the IgniteCache API. In the documentation for removeAll: https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/IgniteCache.html#removeAll--, it mentions this being an expensive operation and that clear should be used instead. If we are using IgniteCache in LOCAL mode with persistence enabled, is there any effective difference between clear and removeAll besides notifying listeners? Is there ever a situation that removeAll should be used instead of clear if we don't have any listeners?
Re: IgniteCache clear vs. removeAll
Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!
I also think that clear() will also not use Cache Store.
I also do not recommend using LOCAL mode caches at all, whether with clear
or removeAll makes a little difference :)
Regards,
--
Ilya Kasnacheev
пн, 9 дек. 2019 г. в 22:32, Mitchell Rathbun (BLOOMBERG/ 731 LEX) <
mrathbun1@bloomberg.net>:
> I am a little confused on the exact difference between clear and removeAll
> in the IgniteCache API. In the documentation for removeAll:
> https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/IgniteCache.html#removeAll--,
> it mentions this being an expensive operation and that clear should be used
> instead. If we are using IgniteCache in LOCAL mode with persistence
> enabled, is there any effective difference between clear and removeAll
> besides notifying listeners? Is there ever a situation that removeAll
> should be used instead of clear if we don't have any listeners?
>