UNPKG

@tapsellorg/angular-material-library

Version:

Angular library for Tapsell

20 lines (19 loc) 996 B
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse } from '@angular/common/http'; import { Observable } from 'rxjs'; import { PghCacheInterceptorOptions } from './models'; import { CacheControllerService } from './cache-controller.service'; import * as i0 from "@angular/core"; export declare class CacheInterceptor implements HttpInterceptor { private options; private cacheControllerService; readonly CACHE_EXPIRE_TIME: number; readonly cachedResponses: Map<string, { response: HttpResponse<unknown>; savedTime: number; }>; readonly pendingRequests: Map<string, Observable<HttpEvent<unknown>>>; constructor(options: PghCacheInterceptorOptions, cacheControllerService: CacheControllerService); intercept(req: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>>; static ɵfac: i0.ɵɵFactoryDeclaration<CacheInterceptor, never>; static ɵprov: i0.ɵɵInjectableDeclaration<CacheInterceptor>; }