mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2026-11-24 09:24:24 +00:00
Avoid running full "update tasks" unless they're absolutely needed. Process Vault API "set" requests immediately instead of in the background
This commit is contained in:
10 files changed
+105
-87
No files matched your search
+6
-3
@@ -451,7 +451,9 @@ public class HolderSubjectData implements LPSubjectData {
|
||||
if (this.type == NodeMapType.TRANSIENT) {
|
||||
// don't bother saving to primary storage. just refresh
|
||||
if (t.getType().isGroup()) {
|
||||
return this.service.getPlugin().getUpdateTaskBuffer().request();
|
||||
this.service.getPlugin().getGroupManager().invalidateAllGroupCaches();
|
||||
this.service.getPlugin().getUserManager().invalidateAllUserCaches();
|
||||
return CompletableFuture.completedFuture(null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -461,8 +463,9 @@ public class HolderSubjectData implements LPSubjectData {
|
||||
return this.service.getPlugin().getStorage().saveUser(user);
|
||||
} else {
|
||||
Group group = ((Group) t);
|
||||
return this.service.getPlugin().getStorage().saveGroup(group)
|
||||
.thenCompose(v -> this.service.getPlugin().getUpdateTaskBuffer().request());
|
||||
this.service.getPlugin().getGroupManager().invalidateAllGroupCaches();
|
||||
this.service.getPlugin().getUserManager().invalidateAllUserCaches();
|
||||
return this.service.getPlugin().getStorage().saveGroup(group);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user