export declare type CacheLoadData = {
    alias?: string;
};
export declare abstract class CacheHolder<Resource, LoadData extends CacheLoadData> {
    static createHashedAbsoluteUrl(url: string, basePath?: string, hashes?: Record<string, string> | string): string;
    private cache;
    private cacheAliases;
    /**
     * Retrieves all cache keys
     *
     * @returns {string[]}
     */
    getAllEntries(): string[];
    /**
     * Retrieves the cached resource from the cache or returns undefined
     *
     * @param {(string)} identifierOrAlias
     * @returns {(Resource | undefined)}
     */
    get(identifierOrAlias: string): Resource | undefined;
    /**
     * Returns true when a resource is available and loaded
     *
     * @param {string} identifierOrAlias
     * @returns {boolean}
     */
    has(identifierOrAlias: string): boolean;
    /**
     * Returns true when a resource is available or currently loading
     *
     * @param {string} identifierOrAlias
     * @returns {boolean}
     */
    hasOrLoads(identifierOrAlias: string): boolean;
    /**
     * Synchronously overwrites a resources
     *
     * @param {string} identifier
     * @param {Resource} value
     */
    put(identifier: string, value: Resource): void;
    /**
     * Removes a resource from the cache either by alias or identifier
     *
     * @param {string} identifierOrAlias
     * @returns {boolean}
     */
    remove(identifierOrAlias: string): boolean;
    awaitResource(identifierOrAlias: string): Promise<Resource>;
    /**
     * Ensures a resources is available in the cache
     *
     * @param {LoadData} data
     * @returns {Promise<Resource>}
     */
    ensure(data: LoadData): Promise<Resource>;
    abstract createIdentifier(data: LoadData): string;
    protected isResourceValid(data: LoadData, resource: Resource): boolean;
    protected onResourceAdded(identifier: string, data?: LoadData): void;
    protected onResourceRemoved(identifier: string): void;
    protected addAlias(alias: string, resourceIdentifier: string): void;
    protected removeAlias(alias: string): void;
    protected abstract load(data: LoadData): Promise<Resource>;
    protected normalizeIdentifier(identifier: LoadData | string): string;
}
