set ttlAutopurge to true as ttl is set for codemirror prometheus client cache (#16024)

Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
This commit is contained in:
Gabriel Bernal 2025-02-12 16:08:45 +01:00 committed by GitHub
parent a944fa1e7a
commit a323c23332
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -294,7 +294,7 @@ class Cache {
constructor(config?: CacheConfig) {
const maxAge = {
ttl: config && config.maxAge ? config.maxAge : 5 * 60 * 1000,
ttlAutopurge: false,
ttlAutopurge: true,
};
this.completeAssociation = new LRUCache<string, Map<string, Set<string>>>(maxAge);
this.metricMetadata = {};