I wonder, if it is possible to disable Xodus cache. I have this scenario - at certain moment I get bulk of data that I store into Xodus EntityStore. After this bulk is processed, I will never add anything else to this store. My idea is to disable caching for the period of feeding the store to get some performance bonus. Then close the store and reopen with changed environment config where caching will be enabled.
Asked
Active
Viewed 108 times
1 Answers
1
You don't have to reopen the database. Provided you have a PersistentEntityStore entityStore
, to disable caching on that level, it's enough to do someting like this:
entityStore.getConfig().setCachingDisabled(true);
try {
// feed the store
}
finally {
entityStore.getConfig().setCachingDisabled(false);
}

Vyacheslav Lukianov
- 1,913
- 8
- 12
-
Right after I sent the question, I found that I was looking on EnvironmentConfig (instead of PersistentEntityStoreConfig) where this option is not present. Thanks! – Martin Feb 21 '19 at 13:15