
com.github.xiaolyuh.cache.caffeine.CaffeineCache Maven / Gradle / Ivy
package com.github.xiaolyuh.cache.caffeine;
import com.alibaba.fastjson.JSON;
import com.github.benmanes.caffeine.cache.Cache;
import com.github.benmanes.caffeine.cache.Caffeine;
import com.github.benmanes.caffeine.cache.LoadingCache;
import com.github.xiaolyuh.cache.AbstractValueAdaptingCache;
import com.github.xiaolyuh.setting.FirstCacheSetting;
import com.github.xiaolyuh.support.ExpireMode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.lang.UsesJava8;
import org.springframework.util.Assert;
import java.util.concurrent.Callable;
/**
* 基于Caffeine实现的一级缓存
*
* @author yuhao.wang
*/
@UsesJava8
public class CaffeineCache extends AbstractValueAdaptingCache {
protected static final Logger logger = LoggerFactory.getLogger(CaffeineCache.class);
/**
* 缓存对象
*/
private final Cache
© 2015 - 2025 Weber Informatics LLC | Privacy Policy