Skip to content

Commit

Permalink
change token price cache policy
Browse files Browse the repository at this point in the history
  • Loading branch information
LightKool committed Mar 8, 2020
1 parent 72d32a5 commit 970a98b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 970a98b

Please sign in to comment.