mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2025-01-26 10:11:45 +01:00
Fix context cache invalidation
This commit is contained in:
parent
9c449def57
commit
6baa472567
@ -76,5 +76,9 @@ public abstract class ExpiringCache<T> implements Supplier<T> {
|
||||
}
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public void invalidate() {
|
||||
this.expirationNanos = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -233,7 +233,10 @@ public abstract class ContextManager<T> {
|
||||
throw new NullPointerException("subject");
|
||||
}
|
||||
|
||||
this.subjectCaches.invalidate(subject);
|
||||
ContextsCache<T> cache = this.subjectCaches.getIfPresent(subject);
|
||||
if (cache != null) {
|
||||
cache.invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
Contexts calculate(T subject) {
|
||||
|
Loading…
Reference in New Issue
Block a user