Skip to main content

Chat

webStorage

Storage for createPeopleCache in localStorage, or another Storage, under one key. A full or unreadable store leaves the cache working from memory.

import { webStorage } from "@/lib/ouro/people-cache";

Example

const names = createPeopleCache<string>({ read: readNames, storage: webStorage("people-names") });

Parameters

key
Type: string
store
Type: Storage
localStorage

Returns

PeopleCacheStorage<T>