From 097c4a035c73d57e242e8520075e76205cc18c8e Mon Sep 17 00:00:00 2001 From: LamGC Date: Thu, 1 Oct 2020 01:02:02 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20CacheStore-local,=20CacheStore-redis?= =?UTF-8?q?=20=E9=80=82=E9=85=8D=20CacheStore-api=20=E7=9A=84=E6=9B=B4?= =?UTF-8?q?=E6=94=B9;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [Update] LocalCacheStoreFactory 根据 CacheStore-local 中实现的特性, 设置 Factory 注解中 source 参数; [Update] RedisCacheStoreFactory 根据 CacheStore-redis 中实现的特性, 设置 Factory 注解中 source 参数; --- .../net/lamgc/cgj/bot/cache/local/LocalCacheStoreFactory.java | 2 +- .../net/lamgc/cgj/bot/cache/redis/RedisCacheStoreFactory.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ContentGrabbingJi-CacheStore-local/src/main/java/net/lamgc/cgj/bot/cache/local/LocalCacheStoreFactory.java b/ContentGrabbingJi-CacheStore-local/src/main/java/net/lamgc/cgj/bot/cache/local/LocalCacheStoreFactory.java index da81605..32a0b23 100644 --- a/ContentGrabbingJi-CacheStore-local/src/main/java/net/lamgc/cgj/bot/cache/local/LocalCacheStoreFactory.java +++ b/ContentGrabbingJi-CacheStore-local/src/main/java/net/lamgc/cgj/bot/cache/local/LocalCacheStoreFactory.java @@ -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 diff --git a/ContentGrabbingJi-CacheStore-redis/src/main/java/net/lamgc/cgj/bot/cache/redis/RedisCacheStoreFactory.java b/ContentGrabbingJi-CacheStore-redis/src/main/java/net/lamgc/cgj/bot/cache/redis/RedisCacheStoreFactory.java index bf28934..3020f23 100644 --- a/ContentGrabbingJi-CacheStore-redis/src/main/java/net/lamgc/cgj/bot/cache/redis/RedisCacheStoreFactory.java +++ b/ContentGrabbingJi-CacheStore-redis/src/main/java/net/lamgc/cgj/bot/cache/redis/RedisCacheStoreFactory.java @@ -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 SingleCacheStore newSingleCacheStore(String identify, StringConverter converter) {