Skip to content

Commit cc321df

Browse files
committed
Modify merge YukiHookPrefsBridge cache function to LruCache and add new PreferencesCacheManager
1 parent ea609fb commit cc321df

File tree

4 files changed

+331
-161
lines changed

4 files changed

+331
-161
lines changed

docs-source/src/en/api/public/com/highcapable/yukihookapi/hook/xposed/prefs/YukiHookPrefsBridge.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,8 @@ fun edit(): Editor
404404

405405
> 创建新的 `Editor`
406406
407+
在模块环境中或启用了 `isUsingNativeStorage` 后使用。
408+
407409
::: warning
408410

409411
在 (Xposed) 宿主环境下只读,无法使用。
@@ -426,6 +428,8 @@ fun edit(initiate: Editor.() -> Unit)
426428
427429
自动调用 `Editor.apply` 方法。
428430

431+
在模块环境中或启用了 `isUsingNativeStorage` 后使用。
432+
429433
::: warning
430434

431435
在 (Xposed) 宿主环境下只读,无法使用。
@@ -444,16 +448,12 @@ fun clearCache()
444448

445449
**Function Illustrate**
446450

447-
> 清除 `XSharedPreferences` 中缓存的键值数据。
451+
> 清除 `YukiHookPrefsBridge` 中缓存的键值数据。
448452
449453
无论是否开启 `YukiHookAPI.Configs.isEnablePrefsBridgeCache`
450454

451455
调用此方法将清除当前存储的全部键值缓存。
452456

453-
下次将从 `XSharedPreferences` 重新读取。
454-
455-
在 (Xposed) 宿主环境中使用。
456-
457457
## Editor <span class="symbol">- class</span>
458458

459459
```kotlin:no-line-numbers
@@ -470,6 +470,8 @@ inner class Editor internal constructor()
470470
471471
请使用 `edit` 方法来获取 `Editor`
472472

473+
在模块环境中或启用了 `isUsingNativeStorage` 后使用。
474+
473475
::: warning
474476

475477
在 (Xposed) 宿主环境下只读,无法使用。

docs-source/src/zh-cn/api/public/com/highcapable/yukihookapi/hook/xposed/prefs/YukiHookPrefsBridge.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,8 @@ fun edit(): Editor
396396

397397
> 创建新的 `Editor`
398398
399+
在模块环境中或启用了 `isUsingNativeStorage` 后使用。
400+
399401
::: warning
400402

401403
在 (Xposed) 宿主环境下只读,无法使用。
@@ -418,6 +420,8 @@ fun edit(initiate: Editor.() -> Unit)
418420
419421
自动调用 `Editor.apply` 方法。
420422

423+
在模块环境中或启用了 `isUsingNativeStorage` 后使用。
424+
421425
::: warning
422426

423427
在 (Xposed) 宿主环境下只读,无法使用。
@@ -436,16 +440,12 @@ fun clearCache()
436440

437441
**功能描述**
438442

439-
> 清除 `XSharedPreferences` 中缓存的键值数据。
443+
> 清除 `YukiHookPrefsBridge` 中缓存的键值数据。
440444
441445
无论是否开启 `YukiHookAPI.Configs.isEnablePrefsBridgeCache`
442446

443447
调用此方法将清除当前存储的全部键值缓存。
444448

445-
下次将从 `XSharedPreferences` 重新读取。
446-
447-
在 (Xposed) 宿主环境中使用。
448-
449449
## Editor <span class="symbol">- class</span>
450450

451451
```kotlin:no-line-numbers
@@ -462,6 +462,8 @@ inner class Editor internal constructor()
462462
463463
请使用 `edit` 方法来获取 `Editor`
464464

465+
在模块环境中或启用了 `isUsingNativeStorage` 后使用。
466+
465467
::: warning
466468

467469
在 (Xposed) 宿主环境下只读,无法使用。

0 commit comments

Comments
 (0)