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

group.rober.base.adapter.CacheManagerAdapter Maven / Gradle / Ivy

The newest version!
package group.rober.base.adapter;


import org.apache.shiro.cache.Cache;
import org.apache.shiro.cache.CacheException;
import org.apache.shiro.cache.CacheManager;


public class CacheManagerAdapter implements CacheManager{
    private final org.springframework.cache.CacheManager cacheManager;

    public CacheManagerAdapter(org.springframework.cache.CacheManager cacheManager) {
        this.cacheManager = cacheManager;
    }

    @Override
    public  Cache getCache(String name) throws CacheException {
        org.springframework.cache.Cache cache = cacheManager.getCache(name);
        return new CacheAdapter<>(cache);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy