diff options
| author | Fuwn <[email protected]> | 2026-04-14 18:19:54 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-04-14 18:19:54 -0700 |
| commit | f3ac4e6051d5b18c26d5a876ce12ddd1fd0f7107 (patch) | |
| tree | 8f54fc3fa12c70b21bf4bf421608c9b9400064da /src/lib/Settings | |
| parent | fix(ui): balance homepage media panels (diff) | |
| parent | feat(cache): instant list revalidation from command palette and debug menu (diff) | |
| download | due.moe-f3ac4e6051d5b18c26d5a876ce12ddd1fd0f7107.tar.xz due.moe-f3ac4e6051d5b18c26d5a876ce12ddd1fd0f7107.zip | |
Merge pull request #3 from Fuwn/feat/instant-cache-invalidation
feat(cache): instant list revalidation from command palette and debug menu
Diffstat (limited to 'src/lib/Settings')
| -rw-r--r-- | src/lib/Settings/Categories/Debug.svelte | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/lib/Settings/Categories/Debug.svelte b/src/lib/Settings/Categories/Debug.svelte index c6b16086..ad388fee 100644 --- a/src/lib/Settings/Categories/Debug.svelte +++ b/src/lib/Settings/Categories/Debug.svelte @@ -7,19 +7,7 @@ import { options } from "$lib/Notification/options"; import locale from "$stores/locale"; import SettingCheckboxToggle from "../SettingCheckboxToggle.svelte"; import localforage from "localforage"; -import { browser } from "$app/environment"; - -const clearCaches = async () => { - if (!browser) return; - - await localforage.removeItem("anime"); - await localforage.removeItem("manga"); - addNotification( - options({ - heading: "Anime and manga list caches successfully cleared", - }), - ); -}; +import { invalidateListCaches } from "$lib/Media/invalidate"; </script> <SettingCheckboxToggle setting="debugDummyLists" text={$locale().debug.dummyLists} /> @@ -29,7 +17,7 @@ const clearCaches = async () => { /> <br /> -<button onclick={clearCaches}>{$locale().debug.clearCaches}</button> +<button onclick={invalidateListCaches}>{$locale().debug.clearCaches}</button> <Spacer /> |