Class RedisCacheImpl
java.lang.Object
cn.toint.oktool.spring.boot.cache.impl.RedisCacheImpl
- All Implemented Interfaces:
Cache
- Author:
- Toint
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(String key) 缓存是否存在void删除缓存获取缓存multiGet(Collection<String> keys) 获取缓存void设置缓存booleanputIfAbsent(String key, String value, Duration timeout) 设置缓存如果不存在
-
Constructor Details
-
RedisCacheImpl
public RedisCacheImpl()
-
-
Method Details
-
put
Description copied from interface:Cache设置缓存 -
putIfAbsent
Description copied from interface:Cache设置缓存如果不存在- Specified by:
putIfAbsentin interfaceCache- Parameters:
key- 缓存键, 不能为空value- 缓存值timeout- 缓存时间, 不能为空- Returns:
- true=设置成功, false=不成功
-
get
Description copied from interface:Cache获取缓存 -
multiGet
Description copied from interface:Cache获取缓存 -
containsKey
Description copied from interface:Cache缓存是否存在- Specified by:
containsKeyin interfaceCache- Parameters:
key- 缓存键, 不能为空- Returns:
- true=存在, false=不存在
-
delete
Description copied from interface:Cache删除缓存
-