From b650a2ede779c5f2e84412bf30d9c182d92e83f6 Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Thu, 9 Apr 2026 23:40:59 +0900 Subject: debug issue with IndexedDB --- src/lib/components/CacheDebug.svelte | 85 ++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 src/lib/components/CacheDebug.svelte (limited to 'src/lib/components/CacheDebug.svelte') diff --git a/src/lib/components/CacheDebug.svelte b/src/lib/components/CacheDebug.svelte new file mode 100644 index 0000000..293ff62 --- /dev/null +++ b/src/lib/components/CacheDebug.svelte @@ -0,0 +1,85 @@ + + +
+ + + {#if !collapsed && stats !== undefined} +
+ +
+
Memory Cache
+
Entries: {stats.entries} ({stats.fullCount} full, {stats.thumbCount} thumb)
+
Size: {formatBytes(stats.totalBytes)}
+
+ + +
+
IndexedDB
+ {#if stats.idbError !== undefined} +
Error: {stats.idbError}
+ {:else} +
Entries: {stats.idbEntries}
+
Size: {formatBytes(stats.idbBytes)}
+
+ {#if stats.idbEntries === stats.entries} + ✅ In sync with memory + {:else if stats.idbEntries < stats.entries} + ⏳ IDB behind ({stats.entries - stats.idbEntries} pending) + {:else} + IDB has {stats.idbEntries - stats.entries} extra (pre-loaded) + {/if} +
+ {/if} +
+
+ {:else if !collapsed} +
+ {#if refreshing}Loading…{:else}No data{/if} +
+ {/if} +
-- cgit v1.2.3