You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

apollo-server-caching

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apollo-server-caching - npm Package Compare versions

Comparing version

to
3.2.0-alpha.0

3

dist/InMemoryLRUCache.d.ts

@@ -1,2 +0,2 @@

import { KeyValueCache } from './KeyValueCache';
import type { KeyValueCache } from './KeyValueCache';
export declare class InMemoryLRUCache<V = string> implements KeyValueCache<V> {

@@ -16,3 +16,4 @@ private store;

getTotalSize(): Promise<number>;
static jsonBytesSizeCalculator<T>(obj: T): number;
}
//# sourceMappingURL=InMemoryLRUCache.d.ts.map

@@ -38,4 +38,7 @@ "use strict";

}
static jsonBytesSizeCalculator(obj) {
return Buffer.byteLength(JSON.stringify(obj), 'utf8');
}
}
exports.InMemoryLRUCache = InMemoryLRUCache;
//# sourceMappingURL=InMemoryLRUCache.js.map

@@ -1,2 +0,2 @@

import { KeyValueCache, KeyValueCacheSetOptions } from './KeyValueCache';
import type { KeyValueCache, KeyValueCacheSetOptions } from './KeyValueCache';
export declare class PrefixingKeyValueCache<V = string> implements KeyValueCache<V> {

@@ -3,0 +3,0 @@ private wrapped;

@@ -1,3 +0,3 @@

import { KeyValueCache } from './KeyValueCache';
import type { KeyValueCache } from './KeyValueCache';
export declare function runKeyValueCacheTests(keyValueCache: KeyValueCache, tick?: (ms: number) => void): Promise<void>;
//# sourceMappingURL=testsuite.d.ts.map
{
"name": "apollo-server-caching",
"version": "3.1.0",
"version": "3.2.0-alpha.0",
"author": "Apollo <opensource@apollographql.com>",

@@ -23,3 +23,3 @@ "license": "MIT",

},
"gitHead": "4dc19131aaea2416b5b2ccab295b06272f94c996"
"gitHead": "119dac4fbe357661cad7163dfa643b02ab479b96"
}
import LRUCache from 'lru-cache';
import { KeyValueCache } from './KeyValueCache';
import type { KeyValueCache } from './KeyValueCache';

@@ -53,2 +53,9 @@ function defaultLengthCalculation(item: any) {

}
// This is a size calculator based on the number of bytes in a JSON
// encoding of the stored object. It happens to be what ApolloServer
// uses for its default DocumentStore and may be helpful to others as well.
static jsonBytesSizeCalculator<T>(obj: T): number {
return Buffer.byteLength(JSON.stringify(obj), 'utf8');
}
}

@@ -1,2 +0,2 @@

import { KeyValueCache, KeyValueCacheSetOptions } from './KeyValueCache';
import type { KeyValueCache, KeyValueCacheSetOptions } from './KeyValueCache';

@@ -3,0 +3,0 @@ // PrefixingKeyValueCache wraps another cache and adds a prefix to all keys used

@@ -1,2 +0,2 @@

import { KeyValueCache } from './KeyValueCache';
import type { KeyValueCache } from './KeyValueCache';

@@ -3,0 +3,0 @@ /**

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet