diff --git a/x-pack/plugins/data_enhanced/public/search/search_interceptor.ts b/x-pack/plugins/data_enhanced/public/search/search_interceptor.ts index 353bb37c7b10f..3e7564933a0c6 100644 --- a/x-pack/plugins/data_enhanced/public/search/search_interceptor.ts +++ b/x-pack/plugins/data_enhanced/public/search/search_interceptor.ts @@ -132,7 +132,7 @@ export class EnhancedSearchInterceptor extends SearchInterceptor { savedToBackgroundSub.unsubscribe(); } }), - // This observable is cached in the responseCache. + // This observable is cached in the responseCache. // Using shareReplay makes sure that future subscribers will get the final response shareReplay(1) diff --git a/x-pack/plugins/data_enhanced/public/search/search_response_cache.ts b/x-pack/plugins/data_enhanced/public/search/search_response_cache.ts index 3a97a180ffaf4..1467e5bf234ff 100644 --- a/x-pack/plugins/data_enhanced/public/search/search_response_cache.ts +++ b/x-pack/plugins/data_enhanced/public/search/search_response_cache.ts @@ -100,7 +100,7 @@ export class SearchResponseCache { response$.subscribe({ next: (r) => { // TODO: avoid stringiying. Get the size some other way! - const newSize = (new Blob([JSON.stringify(r)])).size; + const newSize = new Blob([JSON.stringify(r)]).size; if (this.byteToMb(newSize) < this.maxCacheSizeMB && !isErrorResponse(r)) { this.setItem(key, { ...cacheItem,