From 970a98bccb4822ee64b625a8bbc25b27b54df958 Mon Sep 17 00:00:00 2001 From: LightKool Date: Sun, 8 Mar 2020 15:59:25 +0800 Subject: [PATCH] change token price cache policy --- .../java/com/github/ontio/service/impl/TokenServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back-end-projects/Explorer/src/main/java/com/github/ontio/service/impl/TokenServiceImpl.java b/back-end-projects/Explorer/src/main/java/com/github/ontio/service/impl/TokenServiceImpl.java index dcd525b2..8c44eda2 100644 --- a/back-end-projects/Explorer/src/main/java/com/github/ontio/service/impl/TokenServiceImpl.java +++ b/back-end-projects/Explorer/src/main/java/com/github/ontio/service/impl/TokenServiceImpl.java @@ -210,7 +210,7 @@ public ResponseBean queryPrice(String token, String fiat) { @Autowired public void setParamsConfig(ParamsConfig paramsConfig) { tokenQuotes = Caffeine.newBuilder() - .refreshAfterWrite(Duration.ofMinutes(paramsConfig.getCoinMarketCapRefreshInterval())) + .expireAfterWrite(Duration.ofMinutes(paramsConfig.getCoinMarketCapRefreshInterval())) .build(key -> { String[] parts = key.split("-"); if (parts.length < 2) {