🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@midwayjs/cache-manager

Package Overview
Dependencies
Maintainers
7
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@midwayjs/cache-manager - npm Package Compare versions

Comparing version

to
3.15.5

9

dist/configuration.js

@@ -31,5 +31,6 @@ "use strict";

around: async (joinPoint) => {
let cacheKey = metadata.cacheKey;
const cachingInstance = this.cacheService.get(metadata.cacheInstanceName);
if (typeof metadata.cacheKey === 'function') {
metadata.cacheKey = await metadata.cacheKey({
if (typeof cacheKey === 'function') {
cacheKey = await cacheKey({
methodArgs: joinPoint.args,

@@ -40,4 +41,4 @@ ctx: joinPoint.target[core_1.REQUEST_OBJ_CTX_KEY],

}
if (typeof metadata.cacheKey === 'string') {
return cachingInstance.methodWrap(metadata.cacheKey, joinPoint.proceed, joinPoint.args, metadata.ttl);
if (typeof cacheKey === 'string') {
return cachingInstance.methodWrap(cacheKey, joinPoint.proceed, joinPoint.args, metadata.ttl);
}

@@ -44,0 +45,0 @@ else {

{
"name": "@midwayjs/cache-manager",
"version": "3.15.2",
"version": "3.15.5",
"description": "midway cache manager",

@@ -40,3 +40,3 @@ "main": "dist/index.js",

},
"gitHead": "e8b53689c50aa8c9a691de7d985cafd62f5f70e7"
"gitHead": "dd49d3241aebba3b34f81ed488b4ec76244843c9"
}