com.taotao.cloud.cache.jetcache.enhance.JetCacheSpringCache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of taotao-cloud-starter-cache-jetcache Show documentation
Show all versions of taotao-cloud-starter-cache-jetcache Show documentation
taotao-cloud-starter-cache-jetcache
The newest version!
/*
* Copyright (c) 2020-2030, Shuigedeng ([email protected] & https://blog.taotaocloud.top/).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.taotao.cloud.cache.jetcache.enhance;
import com.alicp.jetcache.Cache;
import com.taotao.cloud.common.utils.common.JsonUtils;
import java.util.concurrent.Callable;
import org.apache.commons.lang3.ObjectUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cache.support.AbstractValueAdaptingCache;
import org.springframework.lang.Nullable;
/** 基于 JetCache 的 Spring Cache 扩展 */
public class JetCacheSpringCache extends AbstractValueAdaptingCache {
private static final Logger log = LoggerFactory.getLogger(JetCacheSpringCache.class);
private final String cacheName;
private final Cache