mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2025-01-27 02:31:55 +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;
|
return this.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void invalidate() {
|
||||||
|
this.expirationNanos = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -233,7 +233,10 @@ public abstract class ContextManager<T> {
|
|||||||
throw new NullPointerException("subject");
|
throw new NullPointerException("subject");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.subjectCaches.invalidate(subject);
|
ContextsCache<T> cache = this.subjectCaches.getIfPresent(subject);
|
||||||
|
if (cache != null) {
|
||||||
|
cache.invalidate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Contexts calculate(T subject) {
|
Contexts calculate(T subject) {
|
||||||
|
Loading…
Reference in New Issue
Block a user