From 54fe9f3d048faf8b7f0cb703f29a070ea5ebaf41 Mon Sep 17 00:00:00 2001 From: junya koyama Date: Tue, 7 Nov 2023 22:44:49 +0900 Subject: [PATCH] build(deps): fix breaking chages. Signed-off-by: junya koyama --- web/ui/module/codemirror-promql/src/client/prometheus.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/ui/module/codemirror-promql/src/client/prometheus.ts b/web/ui/module/codemirror-promql/src/client/prometheus.ts index 84d2add6f..72e34d4ec 100644 --- a/web/ui/module/codemirror-promql/src/client/prometheus.ts +++ b/web/ui/module/codemirror-promql/src/client/prometheus.ts @@ -14,7 +14,7 @@ import { FetchFn } from './index'; import { Matcher } from '../types'; import { labelMatchersToString } from '../parser'; -import LRUCache from 'lru-cache'; +import { LRUCache } from 'lru-cache'; export interface MetricMetadata { type: string; @@ -292,7 +292,10 @@ class Cache { private flags: Record; constructor(config?: CacheConfig) { - const maxAge: LRUCache.LimitedByTTL = { ttl: config && config.maxAge ? config.maxAge : 5 * 60 * 1000 }; + const maxAge = { + ttl: config && config.maxAge ? config.maxAge : 5 * 60 * 1000, + ttlAutopurge: false, + }; this.completeAssociation = new LRUCache>>(maxAge); this.metricMetadata = {}; this.labelValues = new LRUCache(maxAge);