mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2026-11-24 08:14:25 +00:00
Fix group changes via the API not properly invalidating caches (#1534)
This commit is contained in:
21 files changed
+193
-102
No files matched your search
+2
-2
@@ -313,8 +313,8 @@ public abstract class CalculatedSubject implements LPSubject {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void performCleanup() {
|
||||
this.cachedData.doCacheCleanup();
|
||||
public void performCacheCleanup() {
|
||||
this.cachedData.performCacheCleanup();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+6
-1
@@ -166,10 +166,15 @@ public abstract class PermissionHolderSubject<T extends PermissionHolder> implem
|
||||
return this.plugin.getService().getRootDefaults().getOption(contexts, s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void performCacheCleanup() {
|
||||
// do nothing, permission holders are "cleaned up" by a different task
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invalidateCaches() {
|
||||
// invalidate for all changes
|
||||
this.parent.invalidateCachedData();
|
||||
this.parent.getCachedData().invalidate();
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -40,7 +40,7 @@ public class ServiceCacheHousekeepingTask implements Runnable {
|
||||
public void run() {
|
||||
for (LPSubjectCollection collection : this.service.getLoadedCollections().values()) {
|
||||
for (LPSubject subject : collection.getLoadedSubjects()) {
|
||||
subject.performCleanup();
|
||||
subject.performCacheCleanup();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user