Import Interceptor in your 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