{#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.idbWriteErrorCount > 0}
❌ {stats.idbWriteErrorCount} write errors
{#if stats.idbLastWriteError !== undefined}
{stats.idbLastWriteError}
{/if} {/if}
{#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}
Storage Quota
{#if storageEstimate !== undefined}
Used: {formatBytes(storageEstimate.usage)} / {formatBytes(storageEstimate.quota)}
{#if storageEstimate.quota > 0} {@const pct = (storageEstimate.usage / storageEstimate.quota * 100)}
90} class:text-warning={pct > 70 && pct <= 90}>{pct.toFixed(1)}%
{/if} {:else if storageError !== undefined}
{storageError}
{:else}
Querying…
{/if}
{:else if !collapsed}
{#if refreshing}Loading…{:else}No data{/if}
{/if}