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

nuxt-multi-cache

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxt-multi-cache - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

lib/cjs/Cache/Page/Memory/index.js

@@ -10,3 +10,3 @@ "use strict";

constructor(config) {
super();
super(config === null || config === void 0 ? void 0 : config.lruOptions);
this.getCacheKey = (config === null || config === void 0 ? void 0 : config.getCacheKey) || __1.getCacheKey;

@@ -13,0 +13,0 @@ }

@@ -6,4 +6,4 @@ "use strict";

(function (PageCacheMode) {
PageCacheMode["Static"] = "Static";
PageCacheMode["Static"] = "static";
PageCacheMode["Memory"] = "memory";
})(PageCacheMode = exports.PageCacheMode || (exports.PageCacheMode = {}));

@@ -9,2 +9,5 @@ "use strict";

setCacheable() {
if (!this.helper) {
return;
}
if (this.helper.cacheableSet) {

@@ -17,2 +20,5 @@ console.log('The request has already been set as uncachable.');

setUncacheable() {
if (!this.helper) {
return;
}
this.helper.cacheable = false;

@@ -22,2 +28,5 @@ this.helper.cacheableSet = true;

addTags(tags = []) {
if (!this.helper) {
return;
}
this.helper.tags = [...this.helper.tags, ...tags];

@@ -32,10 +41,12 @@ }

set(key, data, tags = []) {
if (this.cache) {
this.cache.set(key, data, tags);
if (!this.cache) {
return;
}
this.cache.set(key, data, tags);
}
get(key) {
if (this.cache) {
return this.cache.get(key);
if (!this.cache) {
return;
}
return this.cache.get(key);
}

@@ -49,5 +60,6 @@ }

add(name, tags = []) {
if (this.cache) {
this.cache.set(name, '', tags);
if (!this.cache) {
return;
}
this.cache.set(name, '', tags);
}

@@ -54,0 +66,0 @@ }

@@ -5,5 +5,5 @@ import { getCacheKey } from '..';

constructor(config) {
super();
super(config === null || config === void 0 ? void 0 : config.lruOptions);
this.getCacheKey = (config === null || config === void 0 ? void 0 : config.getCacheKey) || getCacheKey;
}
}
export var PageCacheMode;
(function (PageCacheMode) {
PageCacheMode["Static"] = "Static";
PageCacheMode["Static"] = "static";
PageCacheMode["Memory"] = "memory";
})(PageCacheMode || (PageCacheMode = {}));

@@ -6,2 +6,5 @@ export class CachePluginRoute {

setCacheable() {
if (!this.helper) {
return;
}
if (this.helper.cacheableSet) {

@@ -14,2 +17,5 @@ console.log('The request has already been set as uncachable.');

setUncacheable() {
if (!this.helper) {
return;
}
this.helper.cacheable = false;

@@ -19,2 +25,5 @@ this.helper.cacheableSet = true;

addTags(tags = []) {
if (!this.helper) {
return;
}
this.helper.tags = [...this.helper.tags, ...tags];

@@ -28,10 +37,12 @@ }

set(key, data, tags = []) {
if (this.cache) {
this.cache.set(key, data, tags);
if (!this.cache) {
return;
}
this.cache.set(key, data, tags);
}
get(key) {
if (this.cache) {
return this.cache.get(key);
if (!this.cache) {
return;
}
return this.cache.get(key);
}

@@ -44,5 +55,6 @@ }

add(name, tags = []) {
if (this.cache) {
this.cache.set(name, '', tags);
if (!this.cache) {
return;
}
this.cache.set(name, '', tags);
}

@@ -49,0 +61,0 @@ }

@@ -6,3 +6,3 @@ import { ServerAuthMethod, ServerAuthCredentials } from './ServerMiddleware';

export declare enum PageCacheMode {
Static = "Static",
Static = "static",
Memory = "memory"

@@ -19,2 +19,3 @@ }

getCacheKey?: (route: string, context: Context) => string | void;
lruOptions?: LRUOptions<string, LRUCacheEntry>;
};

@@ -21,0 +22,0 @@ server: {

{
"name": "nuxt-multi-cache",
"version": "1.0.1",
"version": "1.0.2",
"description": "SSR route, component and data cache for Nuxt.js",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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