Skip to content

Angular interceptor to cache all http requests.

Notifications You must be signed in to change notification settings

patryk-kawalarz/cache-interceptor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Angular cache interceptor

This interceptor caches are all http requests for 60 minutes and stores them in IndexedDB using localForage.

Installation

Add cache.interceptor.ts to your project. Put this in your app.module.ts file:

import { CacheInterceptor } from './services/cache.interceptor'

@NgModule({
  providers: [
    { provide: HTTP_INTERCEPTORS, useClass: CacheInterceptor, multi: true }

Dependencies

MomentJS, localForage

Releases

No releases published

Packages

No packages published