cache-manager
Advanced tools
Comparing version 5.0.0 to 5.0.1
import { MemoryCache, MemoryConfig } from './stores'; | ||
export interface Config { | ||
export declare type Config = { | ||
ttl?: Ttl; | ||
isCacheable?: (val: unknown) => boolean; | ||
} | ||
}; | ||
export declare type Ttl = number; | ||
@@ -20,3 +20,5 @@ export declare type Store = { | ||
export declare type FactoryConfig<T> = T & Config; | ||
declare type FactoryStore<S extends Store, T extends object = never> = (config?: FactoryConfig<T>) => S | Promise<S>; | ||
export declare type FactoryStore<S extends Store, T extends object = never> = (config?: FactoryConfig<T>) => S | Promise<S>; | ||
export declare type Stores<S extends Store, T extends object> = 'memory' | Store | FactoryStore<S, T>; | ||
export declare type CachingConfig<T> = MemoryConfig | StoreConfig | FactoryConfig<T>; | ||
export declare type Cache<S extends Store = Store> = { | ||
@@ -33,2 +35,1 @@ set: (key: string, value: unknown, ttl?: Ttl) => Promise<void>; | ||
export declare function caching<S extends Store, T extends object = never>(factory: FactoryStore<S, T>, args?: FactoryConfig<T>): Promise<Cache<S>>; | ||
export {}; |
{ | ||
"name": "cache-manager", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"description": "Cache module for Node.js", | ||
@@ -39,10 +39,10 @@ "main": "dist/index.js", | ||
"@faker-js/faker": "7.5.0", | ||
"@release-it/conventional-changelog": "5.1.0", | ||
"@release-it/conventional-changelog": "5.1.1", | ||
"@types/lodash.clonedeep": "4.5.7", | ||
"@types/node": "18.7.22", | ||
"@typescript-eslint/eslint-plugin": "5.38.1", | ||
"@typescript-eslint/parser": "5.38.1", | ||
"@vitest/coverage-c8": "0.23.4", | ||
"@types/node": "18.8.3", | ||
"@typescript-eslint/eslint-plugin": "5.39.0", | ||
"@typescript-eslint/parser": "5.39.0", | ||
"@vitest/coverage-c8": "0.24.0", | ||
"dotenv-cli": "6.0.0", | ||
"eslint": "8.24.0", | ||
"eslint": "8.25.0", | ||
"eslint-config-prettier": "8.5.0", | ||
@@ -53,5 +53,5 @@ "eslint-plugin-prettier": "4.2.1", | ||
"prettier": "2.7.1", | ||
"release-it": "15.4.2", | ||
"release-it": "15.5.0", | ||
"typescript": "4.8.4", | ||
"vitest": "0.23.4" | ||
"vitest": "0.24.0" | ||
}, | ||
@@ -58,0 +58,0 @@ "lint-staged": { |
@@ -30,3 +30,3 @@ # node-cache-manager [![npm version](https://badge.fury.io/js/cache-manager.svg)](https://www.npmjs.com/package/cache-manager) [![codecov](https://codecov.io/gh/node-cache-manager/node-cache-manager/branch/master/graph/badge.svg?token=ZV3G5IFigq)](https://codecov.io/gh/node-cache-manager/node-cache-manager) | ||
- [node-cache-manager-ioredis](https://github.com/Tirke/node-cache-manager) (uses [ioredis](https://github.com/luin/ioredis)) | ||
- [node-cache-manager-ioredis](https://github.com/dabroek/node-cache-manager-ioredis) (uses [ioredis](https://github.com/luin/ioredis)) | ||
@@ -33,0 +33,0 @@ - [node-cache-manager-redis-yet](https://github.com/node-cache-manager/node-cache-manager-redis-yet) (uses [node_redis](https://github.com/NodeRedis/node_redis)) |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
65668
584
0
109
2
5
0
21