diff --git a/README.md b/README.md index 1d9f8d7..dadb9e7 100644 --- a/README.md +++ b/README.md @@ -91,20 +91,20 @@ RxCache exposes `evictAll()` method to evict the entire cache in a row. RxCache accepts as argument a set of classes to indicate how the provider needs to handle the cached data: * A Reactive type is the only object required to create a provider. This Reactive type must be equal to the one specified by the returning value of the provider. -* [EvictProvider](https://github.com/VictorAlbertos/RxCache/blob/master/core/src/main/java/io/rx_cache/EvictProvider.java) allows to explicitly evict all the data associated with the provider. -* [@ProviderKey](https://github.com/VictorAlbertos/RxCache/blob/master/core/src/main/java/io/rx_cache/ProviderKey.java) is an annotation for provider methods that is highly recommended to use and proguard users MUST use this annotation, if not used the method names will be used as provider keys (cache keys) and proguard users will quickly run into problems, please see [Proguard](proguard) for detailed information. Using the annotaiton is also useful when not using Proguard as it makes sure you can change your method names without having to write a migration for old cache files. -* [EvictDynamicKey](https://github.com/VictorAlbertos/RxCache/blob/master/core/src/main/java/io/rx_cache/EvictDynamicKey.java) allows to explicitly evict the data of an specific [DynamicKey](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/DynamicKey.java). -* [EvictDynamicKeyGroup](https://github.com/VictorAlbertos/RxCache/blob/master/core/src/main/java/io/rx_cache/EvictDynamicKeyGroup.java) allows to explicitly evict the data of an specific [DynamicKeyGroup](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/DynamicKeyGroup.java). -* [DynamicKey](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/DynamicKey.java) is a wrapper around the key object for those providers which need to handle multiple records, so they need to provide multiple keys, such us endpoints with pagination, ordering or filtering requirements. To evict the data associated with one particular key use `EvictDynamicKey`. -* [DynamicKeyGroup](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/DynamicKeyGroup.java) is a wrapper around the key and the group for those providers which need to handle multiple records grouped, so they need to provide multiple keys organized in groups, such us endpoints with filtering AND pagination requirements. To evict the data associated with the key of one particular group, use `EvictDynamicKeyGroup`. +* [EvictProvider](https://github.com/VictorAlbertos/RxCache/blob/2.x/core/src/main/java/io/rx_cache2/EvictProvider.java) allows to explicitly evict all the data associated with the provider. +* [@ProviderKey](https://github.com/VictorAlbertos/RxCache/blob/2.x/core/src/main/java/io/rx_cache2/ProviderKey.java) is an annotation for provider methods that is highly recommended to use and proguard users MUST use this annotation, if not used the method names will be used as provider keys (cache keys) and proguard users will quickly run into problems, please see [Proguard](proguard) for detailed information. Using the annotaiton is also useful when not using Proguard as it makes sure you can change your method names without having to write a migration for old cache files. +* [EvictDynamicKey](https://github.com/VictorAlbertos/RxCache/blob/2.x/core/src/main/java/io/rx_cache2/EvictDynamicKey.java) allows to explicitly evict the data of an specific [DynamicKey](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/DynamicKey.java). +* [EvictDynamicKeyGroup](https://github.com/VictorAlbertos/RxCache/blob/2.x/core/src/main/java/io/rx_cache2/EvictDynamicKeyGroup.java) allows to explicitly evict the data of an specific [DynamicKeyGroup](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/DynamicKeyGroup.java). +* [DynamicKey](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/DynamicKey.java) is a wrapper around the key object for those providers which need to handle multiple records, so they need to provide multiple keys, such us endpoints with pagination, ordering or filtering requirements. To evict the data associated with one particular key use `EvictDynamicKey`. +* [DynamicKeyGroup](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/DynamicKeyGroup.java) is a wrapper around the key and the group for those providers which need to handle multiple records grouped, so they need to provide multiple keys organized in groups, such us endpoints with filtering AND pagination requirements. To evict the data associated with the key of one particular group, use `EvictDynamicKeyGroup`. Supported annotations: -* [@LifeCache](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/LifeCache.java) sets the amount of time before the data would be evicted. If `@LifeCache` is not supplied, the data will be never evicted unless it is required explicitly using [EvictProvider](https://github.com/VictorAlbertos/RxCache/blob/master/core/src/main/java/io/rx_cache/EvictProvider.java), [EvictDynamicKey](https://github.com/VictorAlbertos/RxCache/blob/master/core/src/main/java/io/rx_cache/EvictDynamicKey.java) or [EvictDynamicKeyGroup](https://github.com/VictorAlbertos/RxCache/blob/master/core/src/main/java/io/rx_cache/EvictDynamicKeyGroup.java) . -* [@Actionable](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/Actionable.java) offers an easy way to perform write operations using providers. More details [here](#actionable_section) -* [@SchemeMigration](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/SchemeMigration.java) and [@Migration](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/Migration.java) provides a simple mechanism for handling migrations between releases. More details [here](#migrations_section) -* [@Expirable](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/Expirable.java) determines if that provider will be excluded from the evicting process or not. More details [here](#expirable_section) -* [@EncryptKey](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/EncryptKey.java) and [@Encrypt](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/Encrypt.java) provides a simple way to encrypt/decrypt the data on persistence layer. More details [here](#encryption_section) +* [@LifeCache](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/LifeCache.java) sets the amount of time before the data would be evicted. If `@LifeCache` is not supplied, the data will be never evicted unless it is required explicitly using [EvictProvider](https://github.com/VictorAlbertos/RxCache/blob/2.x/core/src/main/java/io/rx_cache2/EvictProvider.java), [EvictDynamicKey](https://github.com/VictorAlbertos/RxCache/blob/2.x/core/src/main/java/io/rx_cache2/EvictDynamicKey.java) or [EvictDynamicKeyGroup](https://github.com/VictorAlbertos/RxCache/blob/2.x/core/src/main/java/io/rx_cache2/EvictDynamicKeyGroup.java) . +* [@Actionable](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/Actionable.java) offers an easy way to perform write operations using providers. More details [here](#actionable_section) +* [@SchemeMigration](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/SchemeMigration.java) and [@Migration](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/Migration.java) provides a simple mechanism for handling migrations between releases. More details [here](#migrations_section) +* [@Expirable](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/Expirable.java) determines if that provider will be excluded from the evicting process or not. More details [here](#expirable_section) +* [@EncryptKey](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/EncryptKey.java) and [@Encrypt](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/Encrypt.java) provides a simple way to encrypt/decrypt the data on persistence layer. More details [here](#encryption_section) ### Build an instance of Providers and use it @@ -257,7 +257,7 @@ Nevertheless, there are complete examples for [Android and Java projects](https: **Limitation: This actionable API only support `Observable` as Reactive type.** -This actionable api offers an easy way to perform write operations using providers. Although write operations could be achieved using the classic api too, it's much complex and error-prone. Indeed, the [Actions](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/ActionsList.java) class it's a wrapper around the classic api which play with evicting scopes and lists. +This actionable api offers an easy way to perform write operations using providers. Although write operations could be achieved using the classic api too, it's much complex and error-prone. Indeed, the [Actions](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/ActionsList.java) class it's a wrapper around the classic api which play with evicting scopes and lists. In order to use this actionable api, first you need to add the [repository compiler](https://github.com/VictorAlbertos/RxCache/tree/master/compiler) as a dependency to your project using an annotation processor. For Android, it would be as follows: @@ -282,7 +282,7 @@ dependencies { } ``` -After this configuration, every provider annotated with [@Actionable](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/Actionable.java) `annotation` +After this configuration, every provider annotated with [@Actionable](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/Actionable.java) `annotation` will expose an accessor method in a new generated class called with the same name as the interface, but appending an 'Actionable' suffix. The order in the params supplies must be as in the following example: @@ -309,7 +309,7 @@ RxProvidersActionable.mocksDynamicKey(RxProviders proxy, DynamicKey dynamicKey); RxProvidersActionable.mocksDynamicKeyGroup(RxProviders proxy, DynamicKeyGroup dynamicKeyGroup); ``` -These methods return an instance of the `Actions` class, so now you are ready to use every write operation available in the [Actions](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/ActionsList.java) class. It is advisable to explore the [ActionsTest](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/test/java/io/rx_cache/internal/ActionsListTest.java) class to see what action fits better for your case. If you feel that some action has been missed please don't hesitate to open an issue to request it. +These methods return an instance of the `Actions` class, so now you are ready to use every write operation available in the [Actions](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/ActionsList.java) class. It is advisable to explore the [ActionsTest](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/test/java/io/rx_cache/internal/ActionsListTest.java) class to see what action fits better for your case. If you feel that some action has been missed please don't hesitate to open an issue to request it. Some actions examples: @@ -350,7 +350,7 @@ Every one of the previous actions will be execute only after the composed observ RxCache provides a simple mechanism for handling migrations between releases. -You need to annotate your providers `interface` with [@SchemeMigration](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/SchemeMigration.java). This `annotation` accepts an array of [@Migration](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/Migration.java) annotations, and, in turn, `@Migration` annotation accepts both, a version number and an array of `Class`es which will be deleted from persistence layer. +You need to annotate your providers `interface` with [@SchemeMigration](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/SchemeMigration.java). This `annotation` accepts an array of [@Migration](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/Migration.java) annotations, and, in turn, `@Migration` annotation accepts both, a version number and an array of `Class`es which will be deleted from persistence layer. ```java @SchemeMigration({ @@ -392,9 +392,9 @@ Because RxCache has an internal process to clean memory when it is required, the RxCache provides a simple mechanism to encrypt the data. -You need to annotate your providers `interface` with [@EncryptKey](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/EncryptKey.java). This `annotation` accepts a string as the `key` necessary to encrypt/decrypt the data. But you will need to annotate your provider's records with [@Encrypt](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/Encrypt.java) in order to saved the data encrypted. If no [@Encrypt](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/Encrypt.java) is set, then no encryption will be held. +You need to annotate your providers `interface` with [@EncryptKey](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/EncryptKey.java). This `annotation` accepts a string as the `key` necessary to encrypt/decrypt the data. But you will need to annotate your provider's records with [@Encrypt](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/Encrypt.java) in order to saved the data encrypted. If no [@Encrypt](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/Encrypt.java) is set, then no encryption will be held. -**Important:** If the value of the `key` supplied on [@EncryptKey](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/EncryptKey.java) is modified between compilations, then the previous persisted data will not be able to be evicted/retrieved by RxCache. +**Important:** If the value of the `key` supplied on [@EncryptKey](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/EncryptKey.java) is modified between compilations, then the previous persisted data will not be able to be evicted/retrieved by RxCache. ```java @EncryptKey("myStrongKey-1234") @@ -425,7 +425,7 @@ This limit ensure that the disk will no grow up limitless in case you have provi When this limit is reached, RxCache will not be able to persist in disk new data. That's why RxCache has an automated process to evict any record when the threshold memory assigned to the persistence layer is close to be reached, even if the record life time has not been fulfilled. -But provider's record annotated with [@Expirable](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/Expirable.java) annotation and set its value to false will be excluded from the process. +But provider's record annotated with [@Expirable](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/Expirable.java) annotation and set its value to false will be excluded from the process. ```java interface Providers { diff --git a/README_ZH.md b/README_ZH.md index d5a16c7..2b8888a 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -145,24 +145,24 @@ RxCache的Provider配置中,方法所需要的参数用来配置Provider处理 * 无论如何,必不可少的参数是RxJava提供的响应式基本数据类型(如Observable),这个参数的意义是将你想缓存的Retrofit接口作为参数传入,并以相同的RxJava数据类型作为返回。 > 这意味着,您可以不配置任何可选项,但是您必须将您要缓存的数据作为参数交给RxCache进行缓存. -* [EvictProvider](https://github.com/VictorAlbertos/RxCache/blob/master/core/src/main/java/io/rx_cache/EvictProvider.java) 是否驱逐与该Provider相关联的所有缓存数据. +* [EvictProvider](https://github.com/VictorAlbertos/RxCache/blob/2.x/core/src/main/java/io/rx_cache2/EvictProvider.java) 是否驱逐与该Provider相关联的所有缓存数据. > 该对象通过构造方法进行实例化,创建时需要传入boolean类型的参数,当参数为true时,RxCache会直接驱逐该Provider的缓存数据,进行最新的网络请求并进行缓存;若参数为false,若缓存数据未过期,正常加载缓存数据 -* [@ProviderKey](https://github.com/VictorAlbertos/RxCache/blob/master/core/src/main/java/io/rx_cache/ProviderKey.java) 保护用户数据的Provider方法的注解,强烈建议使用这个注解! 如果不使用该注解,该方法的名称会被作为该Provider的key进行文件缓存, 使用了代码混淆的用户很快会遇到问题,详情请参阅 [Proguard](proguard) . 如果不使用代码混淆,该注解也很有用,因为它可以确保您可以随心所欲修改Provider数据缓存的方法名,而无需为旧缓存文件迁移问题而苦恼。 +* [@ProviderKey](https://github.com/VictorAlbertos/RxCache/blob/2.x/core/src/main/java/io/rx_cache2/ProviderKey.java) 保护用户数据的Provider方法的注解,强烈建议使用这个注解! 如果不使用该注解,该方法的名称会被作为该Provider的key进行文件缓存, 使用了代码混淆的用户很快会遇到问题,详情请参阅 [Proguard](proguard) . 如果不使用代码混淆,该注解也很有用,因为它可以确保您可以随心所欲修改Provider数据缓存的方法名,而无需为旧缓存文件迁移问题而苦恼。 > 该注解是最近版本添加的,在考虑到代码混淆(方法名的改变导致缓存文件命名的改变)和缓存数据迁移,强烈建议使用该注解! -* [EvictDynamicKey](https://github.com/VictorAlbertos/RxCache/blob/master/core/src/main/java/io/rx_cache/EvictDynamicKey.java) 是否驱逐具体的缓存数据 [DynamicKey](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/DynamicKey.java). +* [EvictDynamicKey](https://github.com/VictorAlbertos/RxCache/blob/2.x/core/src/main/java/io/rx_cache2/EvictDynamicKey.java) 是否驱逐具体的缓存数据 [DynamicKey](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/DynamicKey.java). > 缓存数据驱逐范围比EvictProvider小(后者是驱逐所有缓存),比EvictDynamicKeyGroup大(后者是驱逐更精细分类的缓存),举例,若将userId(唯一)作为参数传入DynamicKey,清除缓存时,仅清除该userId下的对应缓存 -* [EvictDynamicKeyGroup](https://github.com/VictorAlbertos/RxCache/blob/master/core/src/main/java/io/rx_cache/EvictDynamicKeyGroup.java) 是否驱逐更加具体的缓存数据 [DynamicKeyGroup](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/DynamicKeyGroup.java). +* [EvictDynamicKeyGroup](https://github.com/VictorAlbertos/RxCache/blob/2.x/core/src/main/java/io/rx_cache2/EvictDynamicKeyGroup.java) 是否驱逐更加具体的缓存数据 [DynamicKeyGroup](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/DynamicKeyGroup.java). > 和EvictDynamicKey对比,上述案例中,DynamicKeyGroup可以filter到某userId下缓存的某一页数据进行驱逐,其他缓存不驱逐 -* [DynamicKey](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/DynamicKey.java) 通过传入一个对象参数(比如userId)实现和对应缓存数据的绑定, 清除该key相关联的缓存数据请使用 `EvictDynamicKey`. -* [DynamicKeyGroup](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/DynamicKeyGroup.java) 通过传入一个Group参数(比如userId,数据的分类)实现和对应缓存数据的绑定, 清除该keyGroup相关联的缓存数据请使用`EvictDynamicKeyGroup`. +* [DynamicKey](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/DynamicKey.java) 通过传入一个对象参数(比如userId)实现和对应缓存数据的绑定, 清除该key相关联的缓存数据请使用 `EvictDynamicKey`. +* [DynamicKeyGroup](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/DynamicKeyGroup.java) 通过传入一个Group参数(比如userId,数据的分类)实现和对应缓存数据的绑定, 清除该keyGroup相关联的缓存数据请使用`EvictDynamicKeyGroup`. Supported annotations: -* [@LifeCache](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/LifeCache.java) 设置缓存过期时间. 如果没有设置@LifeCache , 数据将被永久缓存,直到你使用了 [EvictProvider](https://github.com/VictorAlbertos/RxCache/blob/master/core/src/main/java/io/rx_cache/EvictProvider.java), [EvictDynamicKey](https://github.com/VictorAlbertos/RxCache/blob/master/core/src/main/java/io/rx_cache/EvictDynamicKey.java) or [EvictDynamicKeyGroup](https://github.com/VictorAlbertos/RxCache/blob/master/core/src/main/java/io/rx_cache/EvictDynamicKeyGroup.java) . -* [@Actionable](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/Actionable.java) 提供了使用提供程序执行写入操作的简单方法。 详情参考 [here](#actionable_section) -* [@SchemeMigration](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/SchemeMigration.java) 和 [@Migration](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/Migration.java) 提供了一种处理版本之间迁移的简单机制。 详情参考 [here](#migrations_section) -* [@Expirable](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/Expirable.java) 决定该Provider是否将被排除在清除范围之外.详情参考 [here](#expirable_section) -* [@EncryptKey](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/EncryptKey.java) 和 [@Encrypt](https://github.com/VictorAlbertos/RxCache/blob/master/runtime/src/main/java/io/rx_cache/Encrypt.java) 提供了一种在持久层上加密/解密数据的简单方法。详情参考 [here](#encryption_section) +* [@LifeCache](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/LifeCache.java) 设置缓存过期时间. 如果没有设置@LifeCache , 数据将被永久缓存,直到你使用了 [EvictProvider](https://github.com/VictorAlbertos/RxCache/blob/2.x/core/src/main/java/io/rx_cache2/EvictProvider.java), [EvictDynamicKey](https://github.com/VictorAlbertos/RxCache/blob/2.x/core/src/main/java/io/rx_cache2/EvictDynamicKey.java) or [EvictDynamicKeyGroup](https://github.com/VictorAlbertos/RxCache/blob/2.x/core/src/main/java/io/rx_cache2/EvictDynamicKeyGroup.java) . +* [@Actionable](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/Actionable.java) 提供了使用提供程序执行写入操作的简单方法。 详情参考 [here](#actionable_section) +* [@SchemeMigration](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/SchemeMigration.java) 和 [@Migration](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/Migration.java) 提供了一种处理版本之间迁移的简单机制。 详情参考 [here](#migrations_section) +* [@Expirable](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/Expirable.java) 决定该Provider是否将被排除在清除范围之外.详情参考 [here](#expirable_section) +* [@EncryptKey](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/EncryptKey.java) 和 [@Encrypt](https://github.com/VictorAlbertos/RxCache/blob/2.x/runtime/src/main/java/io/rx_cache2/Encrypt.java) 提供了一种在持久层上加密/解密数据的简单方法。详情参考 [here](#encryption_section) ###