public class CaffeineUtils extends Object
| Constructor and Description |
|---|
CaffeineUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <K,V> com.github.benmanes.caffeine.cache.LoadingCache<K,V> |
createLoadingCache(String cacheName,
Long timeToLiveSeconds,
Long timeToIdleSeconds,
Integer initialCapacity,
Integer maximumSize,
boolean recordStats) |
static <K,V> com.github.benmanes.caffeine.cache.LoadingCache<K,V> |
createLoadingCache(String cacheName,
Long timeToLiveSeconds,
Long timeToIdleSeconds,
Integer initialCapacity,
Integer maximumSize,
boolean recordStats,
com.github.benmanes.caffeine.cache.RemovalListener<K,V> removalListener) |
public static <K,V> com.github.benmanes.caffeine.cache.LoadingCache<K,V> createLoadingCache(String cacheName, Long timeToLiveSeconds, Long timeToIdleSeconds, Integer initialCapacity, Integer maximumSize, boolean recordStats)
cacheName - timeToLiveSeconds - 设置写缓存后过期时间(单位:秒)timeToIdleSeconds - 设置读缓存后过期时间(单位:秒)initialCapacity - maximumSize - recordStats - public static <K,V> com.github.benmanes.caffeine.cache.LoadingCache<K,V> createLoadingCache(String cacheName, Long timeToLiveSeconds, Long timeToIdleSeconds, Integer initialCapacity, Integer maximumSize, boolean recordStats, com.github.benmanes.caffeine.cache.RemovalListener<K,V> removalListener)
cacheName - timeToLiveSeconds - 设置写缓存后过期时间(单位:秒)timeToIdleSeconds - 设置读缓存后过期时间(单位:秒)initialCapacity - maximumSize - recordStats - removalListener - Copyright © 2021. All rights reserved.