1 | import { KeyValueCache } from '@graphql-mesh/types';
|
2 | import DataLoader from 'dataloader';
|
3 | export default class FileCache<V = string> implements KeyValueCache<V> {
|
4 | json: Record<string, V>;
|
5 | absolutePath: string;
|
6 | writeDataLoader: DataLoader<any, any>;
|
7 | constructor({ path }: {
|
8 | path: string;
|
9 | });
|
10 | get(name: string): Promise<V>;
|
11 | set(name: string, value: V): Promise<void>;
|
12 | delete(name: string): Promise<void>;
|
13 | }
|