Skip to content

KaOCode/angular-http-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

angular-http-cache

Import

Import Interceptor in your app.module.ts

Interceptor Import in app.module.ts

  providers: [
    { provide: HTTP_INTERCEPTORS, useClass: CacheInterceptor, multi: true}
  ],

To use the HttpContextToken you need to add

 return this.http.get<[]>('/api', {
      context: new HttpContext().set(CACHEABLE, true)
    })

To your Dataservice

About

Reusable Http Cache CREDITS TO Bricewilson

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published