# extendify/2.2.0/src/Library/state/cache.js

Extendify, version 2.2.0. 13 lines.

- Page: https://pluginprobe.com/plugins/extendify/2.2.0/code/src/Library/state/cache.js
- Raw: https://pluginprobe.com/plugins/extendify/2.2.0/raw/src/Library/state/cache.js
- Modified: 2025-03-13T17:10:44+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/extendify/2.2.0/code/src/Library/state/cache.js#L10-L20`.

```javascript
import { create } from 'zustand';
import { persist } from 'zustand/middleware';

export const useCacheStore = create(
	persist(
		(set) => ({
			categories: [],
			setCategories: (categories) => set({ categories }),
		}),
		{ name: `extendify-library-cache-${window.extSharedData.siteId}` },
	),
);

```
