|
package com.ai.ipu.cache;
/**
* cache接口定义
*/
public interface ICache {
/**
* 存
* @return 是否存储成功
*/
public boolean put(Object key, Object value) throws Exception;
/**
* 取
* @return 存储的缓存的值
*/
public Object get(Object key) throws Exception;
/**
* 移除
* @return 是否移除成功
*/
public boolean remove(Object key) throws Exception;
/**
* 清除
*/
public void clear() throws Exception;
/**
* key是否存在
* @return key是凑存在
*/
public boolean keyExists(String cacheKey);
/**
* 存
* @return 是否存储成功
*/
public boolean put(Object key, Object value, int secondTimeout) throws Exception;
}
|