mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
indexes: snapshot single value storage should drop caches on index update
GitOrigin-RevId: 146fd6a9601aa09e70a98b8f5a69e8670d32c911
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ab5e1e1fea
commit
e79b5b2ea1
+2
-1
@@ -193,8 +193,9 @@ public class SnapshotInputMappings<Key, Value> implements UpdatableSnapshotInput
|
||||
int hash = doGetContentHash((FileContentImpl)content);
|
||||
if (myCompositeHashIdEnumerator != null) {
|
||||
int subIndexerTypeId = mySubIndexerRetriever.getFileIndexerId(content);
|
||||
return myCompositeHashIdEnumerator.enumerate(hash, subIndexerTypeId);
|
||||
hash = myCompositeHashIdEnumerator.enumerate(hash, subIndexerTypeId);
|
||||
}
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -96,6 +96,7 @@ public class SnapshotSingleValueIndexStorage<Key, Value> implements VfsAwareInde
|
||||
public void addValue(Key key, int inputId, Value value) {
|
||||
assert myInitialized;
|
||||
checkKeyInputIdConsistency(key, inputId);
|
||||
myCache.remove(key);
|
||||
// do nothing, all data update is served by forward index, the only one we need to serve here is read access
|
||||
}
|
||||
|
||||
@@ -103,6 +104,7 @@ public class SnapshotSingleValueIndexStorage<Key, Value> implements VfsAwareInde
|
||||
public void removeAllValues(@NotNull Key key, int inputId) {
|
||||
assert myInitialized;
|
||||
checkKeyInputIdConsistency(key, inputId);
|
||||
myCache.remove(key);
|
||||
// do nothing, all data update is served by forward index, the only one we need to serve here is read access
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user