package com.ruoyi.common.third.cache;

import org.springframework.cache.Cache;

import java.util.Collection;

public interface HzCacheManager {
    /**
     * 包装、转换，把spring-HussarCache
     *
     * @param cache spring-cache
     * @return HussarCache
     */
    HzCache cover(Cache cache);

    /**
     * 获取不存在的缓存
     *
     * @param cacheName 缓存名
     * @return HussarCache
     */
    HzCache getMissingCache(String cacheName);

    /**
     * 根据名字获取缓存
     *
     * @param cacheName 缓存名
     * @return HussarCache
     */
    HzCache getCache(String cacheName);

    /**
     * 获取所有的cachename
     * */
    Collection<String> getCacheNames();
}
