All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.patterncat.cache.component.key.CaffeineCacheKeysExtractor Maven / Gradle / Ivy

package cn.patterncat.cache.component.key;

import org.springframework.cache.Cache;
import org.springframework.cache.caffeine.CaffeineCache;

import java.util.Collection;

/**
 * Created by cat on 2019-03-12.
 */
public class CaffeineCacheKeysExtractor implements CacheKeysExtractor{
    @Override
    public Collection extractKeys(Cache cache) {
        CaffeineCache caffeineCache = (CaffeineCache) cache;
        return caffeineCache.getNativeCache().asMap().keySet();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy