Files
spacedrive/interface/app/$libraryId/debug/cache.tsx
Oscar Beaumont c32e60927b [ENG-1400] Normalised caching (#1734)
* prototype

* `.normalise` helper + only `String` keys

* implement it for 'search.paths'

* redux devtools

* fix

* refactor backend

* wip: upgrade to rspc fork

* mega cursed

* Upgrade Specta-related stuff

* Upgrade Typescript

* Cache debug page

* bruh

* Fix optimistic library setting

* Cache clearing

* better timeout

* Fix tags page

* bit of cleanup

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-12-05 13:16:03 +00:00

14 lines
329 B
TypeScript

import { snapshot } from 'valtio';
import { useNormalisedCache } from '@sd/client';
export function Component() {
const cache = useNormalisedCache();
const data = snapshot(cache['#cache']);
return (
<div className="p-4">
<h1>Cache Debug</h1>
<pre className="pt-4">{JSON.stringify(data, null, 2)}</pre>
</div>
);
}