import { IDiskCacheRegistryService } from "./i-disk-cache-registry-service";
import { ICacheRegistryGetOptionsMap } from "../i-cache-registry-get-options";
import { ICacheRegistryGetResult } from "../i-cache-registry-get-result";
import { CacheEntryKind } from "../cache-entry-kind";
import { ILoggerService } from "../../logger/i-logger-service";
import { IBuildConfig } from "../../../build-config/i-build-config";
import { IHasherService } from "../../hasher/i-hasher-service";
import { IBufferSerializer } from "../../../buffer-serializer/i-buffer-serializer";
import { IFileSaver } from "@wessberg/filesaver";
import { IFileLoader } from "@wessberg/fileloader";
/**
 * A cache registry that writes to and reads from disk
 */
export declare class DiskCacheRegistryService implements IDiskCacheRegistryService {
    private readonly fileLoader;
    private readonly fileSaver;
    private readonly bufferSerializer;
    private readonly hasher;
    private readonly config;
    private readonly logger;
    /**
     * The name of the file that contains a map between CacheActions and the latest seen MD5 checksums
     * @type {string}
     */
    private readonly CHECKSUM_CACHE_MAP_FILENAME;
    constructor(fileLoader: IFileLoader, fileSaver: IFileSaver, bufferSerializer: IBufferSerializer, hasher: IHasherService, config: IBuildConfig, logger: ILoggerService);
    /**
     * Gets an item from the disk cache, if any exists
     * @template T
     * @param {T} kind
     * @param {ICacheRegistryGetOptionsMap[T]} options
     * @returns {Promise<ICacheRegistryGetResult|undefined>}
     */
    get<T extends CacheEntryKind>(kind: T, options: ICacheRegistryGetOptionsMap[T]): Promise<ICacheRegistryGetResult[T] | undefined>;
    /**
     * Sets something within the cache
     * @template T
     * @param {T} kind
     * @param {options: ICacheRegistryGetOptionsMap[T]} options
     * @param {ICacheRegistryGetResult[T]} payload
     * @returns {Promise<void>}
     */
    set<T extends CacheEntryKind>(kind: T, options: ICacheRegistryGetOptionsMap[T], payload: ICacheRegistryGetResult[T]): Promise<void>;
    /**
     * Gets the checksum for a specific kind with the given options
     * @template T
     * @param {T} kind
     * @param {ICacheRegistryGetOptionsMap[T]["entryKindOptions"]} options
     * @returns {Promise<string>}
     */
    getChecksum<T extends CacheEntryKind>(kind: T, options: ICacheRegistryGetOptionsMap[T]["entryKindOptions"]): Promise<string>;
    /**
     * Gets the identifier for a specific kind with the given options within the cache
     * @template T
     * @param {T} kind
     * @param {ICacheRegistryGetOptionsMap[T]} _options
     * @returns {string}
     */
    getCacheIdentifier<T extends CacheEntryKind>(kind: T, _options: ICacheRegistryGetOptionsMap[T]["entryKindOptions"]): string;
    /**
     * Returns true if the cache needs to be updated
     * @template T
     * @param {T} kind
     * @param {ICacheRegistryGetOptionsMap[T]} options
     * @returns {Promise<boolean>}
     */
    cacheNeedsUpdate<T extends CacheEntryKind>(kind: T, { entryKindOptions, cacheOptions }: ICacheRegistryGetOptionsMap[T]): Promise<boolean>;
    /**
     * Gets the checksum cache map from disk
     * @param {ICacheRegistryCacheOptions} cacheOptions
     * @returns {Promise<IChecksumCacheMap>}
     */
    private getChecksumCacheMap;
    /**
     * Adds the given checksum for the given action to the checksum cache map
     * @param {string} identifier
     * @param {string} checksum
     * @param {ICacheRegistryCacheOptions} cacheOptions
     * @returns {Promise<void>}
     */
    private addToChecksumCacheMap;
    /**
     * Gets the path to the cache entry for an action
     * @param {string} root
     * @param {string[]} path
     * @returns {string}
     */
    private getPathToCacheFile;
    /**
     * Generates a hash from the given content
     * @param content
     */
    private getHashFromContent;
}
