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,
Integer timeToLiveSeconds,
Integer timeToIdleSeconds,
Integer initialCapacity,
Integer maximumSize,
boolean recordStats) |
static <K,V> com.github.benmanes.caffeine.cache.LoadingCache<K,V> |
createLoadingCache(String cacheName,
Integer timeToLiveSeconds,
Integer timeToIdleSeconds,
Integer initialCapacity,
Integer maximumSize,
boolean recordStats,
com.github.benmanes.caffeine.cache.RemovalListener<K,V> removalListener) |
static void |
main(String[] args) |
public static <K,V> com.github.benmanes.caffeine.cache.LoadingCache<K,V> createLoadingCache(String cacheName, Integer timeToLiveSeconds, Integer 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, Integer timeToLiveSeconds, Integer timeToIdleSeconds, Integer initialCapacity, Integer maximumSize, boolean recordStats, com.github.benmanes.caffeine.cache.RemovalListener<K,V> removalListener)
cacheName
- timeToLiveSeconds
- 设置写缓存后过期时间(单位:秒)timeToIdleSeconds
- 设置读缓存后过期时间(单位:秒)initialCapacity
- maximumSize
- recordStats
- removalListener
- Copyright © 2018. All rights reserved.