apollo-server-caching
Advanced tools
Comparing version 0.5.2 to 0.300.0-alpha.2
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -31,27 +22,17 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
} | ||
get(key) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return this.store.get(key); | ||
}); | ||
async get(key) { | ||
return this.store.get(key); | ||
} | ||
set(key, value, options) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const maxAge = options && options.ttl && options.ttl * 1000; | ||
this.store.set(key, value, maxAge); | ||
}); | ||
async set(key, value, options) { | ||
const maxAge = options && options.ttl && options.ttl * 1000; | ||
this.store.set(key, value, maxAge); | ||
} | ||
delete(key) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
this.store.del(key); | ||
}); | ||
async delete(key) { | ||
this.store.del(key); | ||
} | ||
flush() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
this.store.reset(); | ||
}); | ||
async flush() { | ||
this.store.reset(); | ||
} | ||
getTotalSize() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return this.store.length; | ||
}); | ||
async getTotalSize() { | ||
return this.store.length; | ||
} | ||
@@ -58,0 +39,0 @@ } |
{ | ||
"name": "apollo-server-caching", | ||
"version": "0.5.2", | ||
"version": "0.300.0-alpha.2", | ||
"author": "Apollo <opensource@apollographql.com>", | ||
@@ -18,3 +18,3 @@ "license": "MIT", | ||
"engines": { | ||
"node": ">=6" | ||
"node": ">=12.0 <15.0" | ||
}, | ||
@@ -24,3 +24,3 @@ "dependencies": { | ||
}, | ||
"gitHead": "8cfc947ed56fa3f32b82b32b4bcca53470712984" | ||
"gitHead": "6f3711b589dca8079264969263266cd7b6010ed3" | ||
} |
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
19856
302