export interface BaseCacheHandlerConstructor { new (options: any): BaseCacheHandlerInterface; } export interface BaseCacheHandlerInterface { get: (key: string) => Promise; set: (key: string, data: any, ctx: any) => Promise; revalidateTag: (key: string) => Promise; keys?: () => Promise; delete?: (key: string) => Promise; } export type AdapterConfiguration = { /** custom cache-handler */ CacheHandler: BaseCacheHandlerConstructor; /** unique build id */ buildId: string; /** server cache url */ cacheUrl: string; /** * cache mode * @default 'isomorphic' */ cacheMode: "local" | "remote" | "isomorphic"; /** options from next.js */ options: any; /** mark current build as main and remove cache for all previous */ buildReady: boolean; };