fix(webui): cache and defer thread history
This commit is contained in:
1 parent
7ba60c2ef0
commit
a490cd629b
30 files changed
+1306
-145
No files matched your search
@@ -0,0 +1,14 @@
|
||||
import { MemoryLruCache } from "./memory-lru-cache";
|
||||
import type { WebuiThreadPersistedPayload } from "./types";
|
||||
|
||||
/** Process-local canonical replay cache used for stale-while-revalidate session entry. */
|
||||
export class WebuiThreadCache extends MemoryLruCache<WebuiThreadPersistedPayload> {
|
||||
constructor(
|
||||
maxBytes = 16 * 1024 * 1024,
|
||||
maxEntries = 12,
|
||||
) {
|
||||
super(maxBytes, maxEntries);
|
||||
}
|
||||
}
|
||||
|
||||
export const webuiThreadCache = new WebuiThreadCache();
|
||||
Reference in new issue
Block a user