@screeny05/unstorage-driver-vercel-runtime-cache
v1.0.0
Published
Vercel Runtime Cache driver for unstorage
Downloads
353
Readme
@screeny05/unstorage-driver-vercel-runtime-cache
Provides an unstorage driver which uses the Vercel Runtime Cache API to store data.
This code is extracted from the official unstorage driver for Vercel Runtime Cache API.
Installation
# Using pnpm
pnpm add @screeny05/unstorage-driver-vercel-runtime-cache
# Using yarn
yarn add @screeny05/unstorage-driver-vercel-runtime-cache
# Using npm
npm install @screeny05/unstorage-driver-vercel-runtime-cacheUsage
import { createStorage } from 'unstorage';
import vercelRuntimeCacheStorage from '@screeny05/unstorage-driver-vercel-runtime-cache';
const storage = createStorage({
driver: vercelRuntimeCacheStorage(),
});Nitro configuration:
export default defineNitroConfig({
storage: {
cache: {
driver: '@screeny05/unstorage-driver-vercel-runtime-cache',
},
},
});Nuxt configuration:
export default defineNuxtConfig({
nitro: {
storage: {
cache: {
driver: '@screeny05/unstorage-driver-vercel-runtime-cache',
},
},
},
});