Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix: remove asyncBlock cache

alt05959c088737f
diff --git a/libs/components/editor-core/src/editor/editor.ts b/libs/components/editor-core/src/editor/editor.ts
index 1d1cc95684..2cd379bb26 100644
--- a/libs/components/editor-core/src/editor/editor.ts
+++ b/libs/components/editor-core/src/editor/editor.ts
@@ -1,6 +1,5 @@
/* eslint-disable max-lines */
import HotKeys from 'hotkeys-js';
-import LRUCache from 'lru-cache';
import type { PatchNode } from '@toeverything/components/ui';
import type {
@@ -46,10 +45,7 @@ export interface EditorCtorProps {
}
export class Editor implements Virgo {
- private _cacheManager = new LRUCache<string, Promise<AsyncBlock | null>>({
- max: 8192,
- ttl: 1000 * 60 * 30,
- });
+ private _cacheManager = new Map<string, Promise<AsyncBlock | null>>();
public mouseManager = new MouseManager(this);
public selectionManager = new SelectionManager(this);
public keyboardManager = new KeyboardManager(this);