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

@travetto/cache

Package Overview
Dependencies
Maintainers
1
Versions
325
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@travetto/cache - npm Package Compare versions

Comparing version 1.0.0-beta.6 to 1.0.0-beta.7

4

package.json

@@ -40,4 +40,4 @@ {

},
"version": "1.0.0-beta.6",
"gitHead": "5b2a36d2c958c639de2afba9be10858e3ce6c26c"
"version": "1.0.0-beta.7",
"gitHead": "c7b05ae030aab28c52b83c27bf5bb9f047226231"
}

@@ -5,10 +5,10 @@ import { CacheConfig, CoreCacheConfig } from './types';

export class CacheUtil {
static generateKey(cache: CacheStore, config: CoreCacheConfig, params: any[]) {
static generateKey(config: CoreCacheConfig, cache: CacheStore, params: any[]) {
const input = config.params ? config.params(params) : params;
const keyParams = config.key ? config.key(...input) : input;
return cache.computeKey(keyParams);
return `${config.keySpace!}::${cache.computeKey(keyParams)}`;
}
static async cache(config: CacheConfig, cache: CacheStore, target: any, fn: Function, params: any[]) {
const key = this.generateKey(cache, config, params);
const key = this.generateKey(config, cache, params);

@@ -15,0 +15,0 @@ let res = await cache.getOptional(config, key);

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