Angular interceptor to cache all http requests.
This interceptor caches are all http requests for 60 minutes and stores them in IndexedDB using localForage.
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 }