declare child states

This commit is contained in:
Luck 2016-12-06 21:53:57 +00:00
parent 6760a96527
commit 77b06acad4
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -173,9 +173,7 @@ public abstract class PermissionHolder {
mergedCache.invalidate();
// Invalidate inheritance caches
getAllNodesCache.invalidateAll();
getAllNodesFilteredCache.invalidateAll();
exportNodesCache.invalidateAll();
invalidateInheritanceCaches();
// Get previous references
Set<HolderReference> refs = plugin.getCachedStateManager().getInheritances(toReference());
@ -190,6 +188,13 @@ public abstract class PermissionHolder {
CachedStateManager.invalidateInheritances(plugin, refs);
}
public void invalidateInheritanceCaches() {
getAllNodesCache.invalidateAll();
getAllNodesFilteredCache.invalidateAll();
exportNodesCache.invalidateAll();
declareState();
}
private ImmutableSortedSet<LocalizedNode> cacheApply() {
TreeSet<LocalizedNode> combined = new TreeSet<>(PriorityComparator.reverse());
Set<Node> enduring = getNodes();