HTTP Cache service using environment variable
This commit is contained in:
@@ -7,6 +7,7 @@ import { Observable, Subscriber } from 'rxjs';
|
||||
|
||||
/** Custom Services */
|
||||
import { HttpCacheService } from './http-cache.service';
|
||||
import { environment } from 'environments/environment';
|
||||
|
||||
/**
|
||||
* Caches HTTP requests.
|
||||
@@ -45,7 +46,7 @@ export class CacheInterceptor implements HttpInterceptor {
|
||||
} else {
|
||||
next.handle(request).subscribe(
|
||||
(event) => {
|
||||
if (event instanceof HttpResponse) {
|
||||
if (environment.httpCacheEnabled && event instanceof HttpResponse) {
|
||||
this.httpCacheService.setCacheData(request.urlWithParams, event);
|
||||
}
|
||||
subscriber.next(event);
|
||||
|
||||
-1
@@ -252,7 +252,6 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<button
|
||||
mat-button
|
||||
*ngIf="loanProductSettingsForm.controls.delinquencyBucketId"
|
||||
matSuffix
|
||||
mat-icon-button
|
||||
|
||||
Reference in New Issue
Block a user