mirror of
https://github.com/vale981/apollo-server
synced 2025-03-06 02:01:40 -05:00
nit: Use the term value
rather than data
for Key + *Value* stores.
Super nitty, but they are KeyValue stores, not KeyData stores.
This commit is contained in:
parent
c7f6b43234
commit
098c893990
2 changed files with 4 additions and 4 deletions
|
@ -22,11 +22,11 @@ export class MemcachedCache implements KeyValueCache {
|
||||||
|
|
||||||
async set(
|
async set(
|
||||||
key: string,
|
key: string,
|
||||||
data: string,
|
value: string,
|
||||||
options?: { ttl?: number },
|
options?: { ttl?: number },
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const { ttl } = Object.assign({}, this.defaultSetOptions, options);
|
const { ttl } = Object.assign({}, this.defaultSetOptions, options);
|
||||||
await this.client.set(key, data, ttl);
|
await this.client.set(key, value, ttl);
|
||||||
}
|
}
|
||||||
|
|
||||||
async get(key: string): Promise<string | undefined> {
|
async get(key: string): Promise<string | undefined> {
|
||||||
|
|
|
@ -31,11 +31,11 @@ export class RedisCache implements KeyValueCache<string> {
|
||||||
|
|
||||||
async set(
|
async set(
|
||||||
key: string,
|
key: string,
|
||||||
data: string,
|
value: string,
|
||||||
options?: { ttl?: number },
|
options?: { ttl?: number },
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const { ttl } = Object.assign({}, this.defaultSetOptions, options);
|
const { ttl } = Object.assign({}, this.defaultSetOptions, options);
|
||||||
await this.client.set(key, data, 'EX', ttl);
|
await this.client.set(key, value, 'EX', ttl);
|
||||||
}
|
}
|
||||||
|
|
||||||
async get(key: string): Promise<string | undefined> {
|
async get(key: string): Promise<string | undefined> {
|
||||||
|
|
Loading…
Add table
Reference in a new issue