apollo-server-caching
Advanced tools
Comparing version
@@ -9,3 +9,4 @@ import { KeyValueCache } from './KeyValueCache'; | ||
set(key: string, value: string): Promise<void>; | ||
delete(key: string): Promise<void>; | ||
} | ||
//# sourceMappingURL=InMemoryLRUCache.d.ts.map |
@@ -32,4 +32,9 @@ "use strict"; | ||
} | ||
delete(key) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
this.store.del(key); | ||
}); | ||
} | ||
} | ||
exports.InMemoryLRUCache = InMemoryLRUCache; | ||
//# sourceMappingURL=InMemoryLRUCache.js.map |
@@ -6,3 +6,4 @@ export interface KeyValueCache { | ||
}): Promise<void>; | ||
delete(key: string): Promise<boolean | void>; | ||
} | ||
//# sourceMappingURL=KeyValueCache.d.ts.map |
{ | ||
"name": "apollo-server-caching", | ||
"version": "0.2.0-alpha.0", | ||
"version": "0.2.0-alpha.1", | ||
"author": "opensource@apollographql.com", | ||
@@ -22,3 +22,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "dec2b94a0e309c1c75b3e9f3d7b4011e36a7e48a" | ||
"gitHead": "5b8388323325c14970601310d7864b86010cbebe" | ||
} |
@@ -1,6 +0,2 @@ | ||
import { | ||
advanceTimeBy, | ||
mockDate, | ||
unmockDate, | ||
} from '../../../../__mocks__/date'; | ||
import { advanceTimeBy, mockDate, unmockDate } from '__mocks__/date'; | ||
@@ -7,0 +3,0 @@ export function testKeyValueCache(keyValueCache: any) { |
@@ -21,2 +21,5 @@ import LRU from 'lru-cache'; | ||
} | ||
async delete(key: string) { | ||
this.store.del(key); | ||
} | ||
} |
export interface KeyValueCache { | ||
get(key: string): Promise<string | undefined>; | ||
set(key: string, value: string, options?: { ttl?: number }): Promise<void>; | ||
delete(key: string): Promise<boolean | void>; | ||
} |
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
10153
6.78%20
5.26%133
11.76%