From bcf09b6af7fa67f5fe8755a7b49db511f9f3f085 Mon Sep 17 00:00:00 2001 From: LamGC Date: Fri, 9 Oct 2020 00:37:20 +0800 Subject: [PATCH] =?UTF-8?q?[Update][Document]=20CacheStore-API=20=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=20Readme,=20=E8=A1=A5=E5=85=85=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E5=86=85=E5=AE=B9;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [Update] README.md 增加一些细节内容; --- ContentGrabbingJi-CacheStore-api/README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ContentGrabbingJi-CacheStore-api/README.md b/ContentGrabbingJi-CacheStore-api/README.md index 9071452..73b243e 100644 --- a/ContentGrabbingJi-CacheStore-api/README.md +++ b/ContentGrabbingJi-CacheStore-api/README.md @@ -1,10 +1,16 @@ # CacheStore-API # 如需开发更多缓存组件,至少需要实现以下接口: -- CacheStore - - 不一定要实现该接口, 可以直接实现 具体的接口(比如 `SingleCacheStore`) +- CacheStore / CollectionCacheStore + - `CacheStore` 是所有缓存容器的父接口。 + - 这两个类为抽象接口,定义了部分具体接口的公共方法。 + - 不一定要**单独**实现该接口,可以**直接实现**具体的接口(比如 `SingleCacheStore`) - CacheStoreFactory - 你还需要为其添加 `@Factory` 注解,否则不会生效。 -- SingleCacheStore +- SingleCacheStore / MapCacheStore / SetCacheStore / ListCacheStore + - `MapCacheStore`、`SetCacheStore` 和 `ListCacheStore` 是 `CollectionCacheStore` 的子类。 + - 至少需要提供其中一种实现才能算是一个有效的缓存组件。尚未实现的部分将会由其他组件代替。 + +完成缓存组件的开发后,应按照 SPI 机制的要求,设置所属 CacheStoreFactory 为 Service。 正常情况下,该模块不需要进行更改,即使需要更改,也需要保证向后兼容性。