Search code examples
storageexternalignite

Ignite - External Storage - reload didn't work


In my application I have cache that fills up from External Storage (Postgres database). All configurations are similar to examples in developer guide.

I load data using this code:

ignite.cache("ProductCache").loadCache(null);

and it works okey.

But if I change data in External Storage (insert/update/delete) and then again load data with the same code thats changes do not appear in cache.

But if I restart application and load data it's all rigth - I see changes.

Why?


Solution

  • You can do ignite.cache.clear() first, then loadCache(null). Otherwise, Ignite will not overwrite entries which are already present (by key).