MCPcopy Create free account
hub / github.com/code-forge-io/remix-client-cache / createCacheAdapter

Function createCacheAdapter

src/index.tsx:68–79  ·  view source on GitHub ↗
(adapter: () => CacheAdapter)

Source from the content-addressed store, hash-verified

66};
67
68export const createCacheAdapter = (adapter: () => CacheAdapter) => {
69 if (typeof document === "undefined") return { adapter: undefined };
70 const adapterInstance = adapter();
71 if (adapterInstance instanceof Storage) {
72 return {
73 adapter: augmentStorageAdapter(adapterInstance),
74 };
75 }
76 return {
77 adapter: adapter(),
78 };
79};
80
81export const configureGlobalCache = (
82 newCacheInstance: () => CacheAdapter | Storage,

Callers 1

user.$user.tsxFile · 0.85

Calls 1

augmentStorageAdapterFunction · 0.85

Tested by

no test coverage detected