Change bypass cache to expireAfterWrite.

This hasn't caused issues for the past 5 years but I guess ¯\_(ツ)_/¯
This commit is contained in:
wizjany 2020-02-06 18:16:55 -05:00
parent 6f6125fe00
commit 0d860bfca7

View File

@ -59,7 +59,7 @@ public abstract class AbstractSessionManager implements SessionManager {
private final LoadingCache<WorldPlayerTuple, Boolean> bypassCache = CacheBuilder.newBuilder()
.maximumSize(1000)
.expireAfterAccess(2, TimeUnit.SECONDS)
.expireAfterWrite(2, TimeUnit.SECONDS)
.build(CacheLoader.from(tuple ->
tuple.getPlayer().hasPermission("worldguard.region.bypass." + tuple.getWorld().getName())));