Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 3.1.0 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

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