mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
Caching 5s
Former-commit-id: 4affbb3b7cf8fcd96a9d63e875e1e683ba766e03
This commit is contained in:
1 parent
f58f20ba77
commit
b03a5eb564
2 files changed
+11
-1
No files matched your search
@@ -10,7 +10,7 @@ import org.maxgamer.quickshop.Shop.Shop;
|
||||
public class Cache extends TimerTask {
|
||||
private QuickShop plugin;
|
||||
|
||||
private long expireTime = 10;
|
||||
private long expireTime = 5000;
|
||||
|
||||
private Map<Location, CacheContainer> accessCaching = new HashMap<>(1000);
|
||||
|
||||
@@ -26,6 +26,10 @@ public class Cache extends TimerTask {
|
||||
}.runTaskTimerAsynchronously(plugin, 0, expireTime * 20);
|
||||
}
|
||||
|
||||
public int getCachingSize() {
|
||||
return accessCaching.size();
|
||||
}
|
||||
|
||||
public Shop getCaching(Location location, boolean includeAttached) {
|
||||
CacheContainer container;
|
||||
synchronized (lock) {
|
||||
|
||||
@@ -159,6 +159,12 @@ public class Paste {
|
||||
.append("\n");
|
||||
}
|
||||
finalReport.append("================================================\n");
|
||||
finalReport.append("Internal Data:\n");
|
||||
finalReport.append("Caching Pool Enabled: ").append(plugin.getShopCache() != null).append("\n");
|
||||
if (plugin.getShopCache() != null) {
|
||||
finalReport.append("Caching Contents: ").append(plugin.getShopCache().getCachingSize()).append("\n");
|
||||
}
|
||||
finalReport.append("================================================\n");
|
||||
finalReport.append("Configurations:\n");
|
||||
try {
|
||||
finalReport.append("\t*********************************\n");
|
||||
|
||||
Reference in new issue
Block a user