[Update] CacheStore-local, CacheStore-redis 适配 CacheStore-api 的更改;

[Update] LocalCacheStoreFactory 根据 CacheStore-local 中实现的特性, 设置 Factory 注解中 source 参数;
[Update] RedisCacheStoreFactory 根据 CacheStore-redis 中实现的特性, 设置 Factory 注解中 source 参数;
This commit is contained in:
LamGC 2020-10-01 01:02:02 +08:00
parent 75f19e5d21
commit 097c4a035c
Signed by: LamGC
GPG Key ID: 6C5AE2A913941E1D
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ import net.lamgc.cgj.bot.cache.convert.StringConverter;
* 最简单的缓存实现, 无持久化功能.
* @author LamGC
*/
@Factory(name = "Local", priority = FactoryPriority.PRIORITY_LOWEST)
@Factory(name = "Local", priority = FactoryPriority.PRIORITY_LOWEST, source = CacheStoreSource.MEMORY)
public class LocalCacheStoreFactory implements CacheStoreFactory {
@Override

View File

@ -25,7 +25,7 @@ import net.lamgc.cgj.bot.cache.exception.GetCacheStoreException;
*
* @author LamGC
*/
@Factory(name = "Redis")
@Factory(name = "Redis", priority = FactoryPriority.PRIORITY_HIGHER, source = CacheStoreSource.REMOTE)
public class RedisCacheStoreFactory implements CacheStoreFactory {
@Override
public <V> SingleCacheStore<V> newSingleCacheStore(String identify, StringConverter<V> converter) {