mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-02-21 14:52:05 +01:00
Fixes a bug with cache. (#1533)
It was not possible to set it to unlimited time due to my poor programming and logic skills. It also was contradicting to config comments.
This commit is contained in:
parent
cda300e28a
commit
6cd9339652
@ -78,9 +78,8 @@ public class HeadGetter {
|
|||||||
// If timestamp is set to 0, then it must be kept forever.
|
// If timestamp is set to 0, then it must be kept forever.
|
||||||
// If settings time is set to 0, then always use cache.
|
// If settings time is set to 0, then always use cache.
|
||||||
if (cache != null &&
|
if (cache != null &&
|
||||||
cache.getTimestamp() != 0 &&
|
(cache.getTimestamp() == 0 || cacheTimeout == 0 ||
|
||||||
cacheTimeout > 0 &&
|
System.currentTimeMillis() - cache.getTimestamp() <= cacheTimeout))
|
||||||
System.currentTimeMillis() - cache.getTimestamp() <= cacheTimeout)
|
|
||||||
{
|
{
|
||||||
panelItem.setHead(cachedHeads.get(panelItem.getPlayerHeadName()).getPlayerHead());
|
panelItem.setHead(cachedHeads.get(panelItem.getPlayerHeadName()).getPlayerHead());
|
||||||
requester.setHead(panelItem);
|
requester.setHead(panelItem);
|
||||||
|
Loading…
Reference in New Issue
Block a user