
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
prisma-upstash-middleware
Advanced tools
Prisma query caching middleware to Upstash Redis with automatic date-strings conversion
pnpm add prisma-upstash-middleware
import { PrismaClient } from "@prisma/client";
import { Redis } from "@upstash/redis";
import upstashMiddleware from "prisma-upstash-middleware";
const prisma = new PrismaClient();
const redis = Redis.fromEnv();
prisma.$use(
upstashMiddleware({
redis: redis,
models: ["User", "Post"],
actions: ["findUnique", "findMany"],
args: { ex: 300 },
}),
);
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
There will be errors like error TS2305: Module '"@prisma/client"' has no exported member 'Prisma'.
if this not done:
pnpm install
pnpm exec prisma init
pnpm exec prisma generate
pnpm build
Not necessarily pnpm, you are free to use any other Package Manager
model User {
id String @id @default(cuid())
}
This project is licensed under the MIT License.
FAQs
Prisma query caching middleware
The npm package prisma-upstash-middleware receives a total of 0 weekly downloads. As such, prisma-upstash-middleware popularity was classified as not popular.
We found that prisma-upstash-middleware demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.