Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

prisma-redis-middleware

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prisma-redis-middleware - npm Package Compare versions

Comparing version 0.8.0 to 0.8.1

2

package.json
{
"name": "prisma-redis-middleware",
"main": "src/index.ts",
"version": "0.8.0",
"version": "0.8.1",
"description": "Prisma Middleware for caching results of queries in Redis",

@@ -6,0 +6,0 @@ "engines": {

@@ -55,3 +55,3 @@ # Prisma Redis Middleware

createPrismaRedisCache({
model: [`User`, `Post`],
models: [`User`, `Post`],
cacheTime: 300, // five minutes

@@ -65,3 +65,3 @@ redis,

const options = {
model: [`Comment`],
models: [`Comment`],
cacheTime: 60 * 1000 * 30, // thirty minutes

@@ -77,7 +77,7 @@ redis,

The `prisma-redis-middleware` function takes 4 arguments, `model`, `cacheTime` and `redis` are required arguments.
The `prisma-redis-middleware` function takes 4 arguments, `models`, `cacheTime` and `redis` are required arguments.
`excludeCacheMethods` is an optional argument.
```mjs
createPrismaMiddleware({ model, cacheTime, redis, excludeCacheMethods });
createPrismaMiddleware({ models, cacheTime, redis, excludeCacheMethods });
```

@@ -87,3 +87,3 @@

- `model`: An array of Prisma models (for example `User`, `Post`, `Comment`) (required)
- `models`: An array of Prisma models (for example `User`, `Post`, `Comment`) (required)
- `cacheTime`: number (milliseconds) (required)

@@ -90,0 +90,0 @@ - `redis`: A Redis instance (required)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc