mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-07 07:32:03 -07:00
Configurable save-on-stop-only for UserCache
By: drXor <mcyoungsota@gmail.com>
This commit is contained in:
@@ -9,7 +9,16 @@
|
||||
}
|
||||
};
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
@@ -117,7 +117,7 @@
|
||||
GameProfileCache.GameProfileInfo usercache_usercacheentry = new GameProfileCache.GameProfileInfo(profile, date);
|
||||
|
||||
this.safeAdd(usercache_usercacheentry);
|
||||
- this.save();
|
||||
+ if( !org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly ) this.save(); // Spigot - skip saving if disabled
|
||||
}
|
||||
|
||||
private long getNextOperation() {
|
||||
@@ -142,14 +142,14 @@
|
||||
usercache_usercacheentry.setLastAccess(this.getNextOperation());
|
||||
optional = Optional.of(usercache_usercacheentry.getProfile());
|
||||
} else {
|
||||
@@ -18,6 +27,14 @@
|
||||
if (optional.isPresent()) {
|
||||
this.add((GameProfile) optional.get());
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
|
||||
- if (flag) {
|
||||
+ if (flag && !org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) { // Spigot - skip saving if disabled
|
||||
this.save();
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
|
||||
label54:
|
||||
|
Reference in New Issue
Block a user