import { HttpResponse } from '@angular/common/http';
import { ConfigService } from './config.service';
import * as i0 from "@angular/core";
export interface HttpCacheEntry {
    lastUpdated: Date;
    data: HttpResponse<any>;
}
/**
 * Provides a cache facility for HTTP requests with configurable persistence policy.
 */
export declare class HttpCacheService {
    private configService;
    private cachedData;
    private storage;
    private cachePersistenceKey;
    constructor(configService: ConfigService);
    /**
     * Sets the cache data for the specified request.
     * @param {!string} url The request URL.
     * @param {ResponseOptions} data The received data.
     * @param {Date=} lastUpdated The cache last update, current date is used if not specified.
     */
    setCacheData(url: string, data: HttpResponse<any>, lastUpdated?: Date): void;
    /**
     * Gets the cached data for the specified request.
     * @param {!string} url The request URL.
     * @return {?ResponseOptions} The cached data or null if no cached data exists for this request.
     */
    getCacheData(url: string): HttpResponse<any> | null;
    /**
     * Gets the cached entry for the specified request.
     * @param {!string} url The request URL.
     * @return {?HttpCacheEntry} The cache entry or null if no cache entry exists for this request.
     */
    getHttpCacheEntry(url: string): HttpCacheEntry | null;
    /**
     * Clears the cached entry (if exists) for the specified request.
     * @param {!string} url The request URL.
     */
    clearCache(url: string): void;
    /**
     * Cleans cache entries older than the specified date.
     * @param {date=} expirationDate The cache expiration date. If no date is specified, all cache is cleared.
     */
    cleanCache(expirationDate?: Date): void;
    /**
     * Sets the cache persistence policy.
     * Note that changing the cache persistence will also clear the cache from its previous storage.
     * @param {'local'|'session'=} persistence How the cache should be persisted, it can be either local or session
     *   storage, or if no value is provided it will be only in-memory (default).
     */
    setPersistence(persistence?: 'local' | 'session'): void;
    private saveCacheData;
    private loadCacheData;
    static ɵfac: i0.ɵɵFactoryDeclaration<HttpCacheService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<HttpCacheService>;
}
