import { RedisClientOptions, RedisClientType } from 'redis';
export interface MemoizerOpts {
    prefix?: string;
    client?: RedisClientType;
    clientOpts?: RedisClientOptions;
    emptyMode?: boolean;
}
export interface MemoizeOpts {
    key: string;
    lockTimeout?: number;
    ttl?: number;
}
export declare type MemoizedFunctionArgs = Record<string, unknown> | void;
export declare type MemoizableFunction<U, T extends MemoizedFunctionArgs = void> = (args: T) => Promise<U>;
export interface Memoizer {
    invalidate(key: string, args: MemoizedFunctionArgs): Promise<void>;
    memoize<U, T extends MemoizedFunctionArgs>(fn: MemoizableFunction<U, T>, opts: MemoizeOpts): MemoizableFunction<U, T>;
    quit(): Promise<void>;
    end(): Promise<void>;
}
export declare const createMemoizer: (instanceOpts: MemoizerOpts) => Promise<Memoizer>;
export declare const produceKeyWithArgs: (prefix: string, key: string, args: MemoizedFunctionArgs) => string;
