webui: remove artificial cache limit, let GC handle cleanup on conversation change
This commit is contained in:
parent
965655fafb
commit
4642664c1a
|
|
@ -61,7 +61,8 @@
|
|||
let pendingMarkdown: string | null = null;
|
||||
let isProcessing = false;
|
||||
|
||||
// Incremental parsing cache, avoids re-transforming stable blocks
|
||||
// Per-instance transform cache, avoids re-transforming stable blocks during streaming
|
||||
// Garbage collected when component is destroyed (on conversation change)
|
||||
const transformCache = new SvelteMap<string, string>();
|
||||
let previousContent = '';
|
||||
|
||||
|
|
@ -237,12 +238,6 @@
|
|||
|
||||
transformCache.set(hash, html);
|
||||
|
||||
// Limit cache size (generous limit for 200K token contexts)
|
||||
if (transformCache.size > 5000) {
|
||||
const keysToDelete = Array.from(transformCache.keys()).slice(0, 1000);
|
||||
keysToDelete.forEach((k) => transformCache.delete(k));
|
||||
}
|
||||
|
||||
return { html, hash };
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue