prisma-redis-middleware
Advanced tools
Comparing version 0.8.0 to 0.8.1
{ | ||
"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) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25980