import { PrettyLoggerLegacy } from '../logger/pretty_logger/pretty_logger.cjs';
import { AnyValue } from '../../common/types/custom_type.types.cjs';

declare type Cache = {
    key: string;
    values: AnyValue;
    ttl: number;
};
declare const defaultCacheManagerConfig: {
    mode: "MEM" | "REDIS";
    REDIS: {
        host: string | undefined;
        port: string | undefined;
        password: string | undefined;
        username: string | undefined;
        database: number | undefined;
    };
    MEM: {};
};
declare type CacheManagerConfig = typeof defaultCacheManagerConfig;
declare type CacheScope = `PUBLIC`;
declare class CacheManager {
    cacheManagerName: string;
    private readonly _logger;
    private readonly _config;
    internalCachePool: Record<string, Cache>;
    constructor(cacheManagerName?: string, _logger?: PrettyLoggerLegacy, _config?: CacheManagerConfig);
    private readonly _isCacheEnabled;
    static create: (opt?: {
        cacheManagerName?: string;
    }) => Promise<CacheManager>;
    init: (opt?: {
        cacheManagerName?: string;
    }) => Promise<void>;
    cleanExpiredInternalCache: () => void;
    fetchCache: <T>(key: string, scope?: CacheScope) => Promise<T | undefined>;
    flushCache: (key: string) => Promise<undefined>;
    saveCache: <T extends AnyValue>(key: string, values: T, scope?: CacheScope) => Promise<undefined>;
    pushCacheValue: <T>(key: string, value: T, scope?: CacheScope) => Promise<T[] | undefined>;
}

export { CacheManager };
