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

cn.patterncat.cache.component.CascadeCacheManager Maven / Gradle / Ivy

package cn.patterncat.cache.component;

import org.springframework.cache.CacheManager;
import org.springframework.cache.support.CompositeCacheManager;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
 * Created by cat on 2019-03-12.
 */
public class CascadeCacheManager extends CompositeCacheManager {

    List cacheManagers = new ArrayList<>();

    public CascadeCacheManager() {
    }

    @Override
    public void setCacheManagers(Collection cacheManagers) {
        super.setCacheManagers(cacheManagers);
        this.cacheManagers.addAll(cacheManagers);
    }

    public List getCacheManagers() {
        return cacheManagers;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy