mirror of
https://github.com/LamGC/ContentGrabbingJi.git
synced 2025-04-29 22:27:33 +00:00
[Update] CacheStore-local, CacheStore-redis 适配 CacheStore-api 的更改;
[Update] LocalCacheStoreFactory 根据 CacheStore-local 中实现的特性, 设置 Factory 注解中 source 参数; [Update] RedisCacheStoreFactory 根据 CacheStore-redis 中实现的特性, 设置 Factory 注解中 source 参数;
This commit is contained in:
parent
75f19e5d21
commit
097c4a035c
@ -26,7 +26,7 @@ import net.lamgc.cgj.bot.cache.convert.StringConverter;
|
|||||||
* 最简单的缓存实现, 无持久化功能.
|
* 最简单的缓存实现, 无持久化功能.
|
||||||
* @author LamGC
|
* @author LamGC
|
||||||
*/
|
*/
|
||||||
@Factory(name = "Local", priority = FactoryPriority.PRIORITY_LOWEST)
|
@Factory(name = "Local", priority = FactoryPriority.PRIORITY_LOWEST, source = CacheStoreSource.MEMORY)
|
||||||
public class LocalCacheStoreFactory implements CacheStoreFactory {
|
public class LocalCacheStoreFactory implements CacheStoreFactory {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -25,7 +25,7 @@ import net.lamgc.cgj.bot.cache.exception.GetCacheStoreException;
|
|||||||
*
|
*
|
||||||
* @author LamGC
|
* @author LamGC
|
||||||
*/
|
*/
|
||||||
@Factory(name = "Redis")
|
@Factory(name = "Redis", priority = FactoryPriority.PRIORITY_HIGHER, source = CacheStoreSource.REMOTE)
|
||||||
public class RedisCacheStoreFactory implements CacheStoreFactory {
|
public class RedisCacheStoreFactory implements CacheStoreFactory {
|
||||||
@Override
|
@Override
|
||||||
public <V> SingleCacheStore<V> newSingleCacheStore(String identify, StringConverter<V> converter) {
|
public <V> SingleCacheStore<V> newSingleCacheStore(String identify, StringConverter<V> converter) {
|
||||||
|
Loading…
Reference in New Issue
Block a user