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

com.maxiaofa.captcha.spring.boot.framework.cache.ICacheService Maven / Gradle / Ivy

The newest version!
package com.maxiaofa.captcha.spring.boot.framework.cache;

import java.util.concurrent.TimeUnit;

/**
 * 缓存接口
 * @author MaXiaoFa
 */
public interface ICacheService {

    /**
     * 获取缓存
     * @param key 缓存键
     * @return 缓存值
     * */
    public V getCache(K key);

    /**
     * 设置缓存
     * @param key 缓存键
     * @param value 缓存值
     * @param timeout 时间
     * @param unit 时间粒度
     * */
    public void setCache(K key,V value,long timeout, TimeUnit unit);

    /**
     * 设置缓存
     * @param key 缓存键
     * @param value 缓存值
     * */
    public void setCache(K key,V value);

    /**
     * 删除缓存
     * @param key 缓存键
     * */
    public void delCache(K key);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy