MCPcopy Create free account
hub / github.com/experdot/pointer / ICachedStore

Interface ICachedStore

src/renderer/src/stores/interfaces/base.ts:87–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85 * @template T 缓存的数据类型
86 */
87export interface ICachedStore<T> extends IResettable {
88 /**
89 * 加载数据到缓存
90 * 如果已缓存则直接返回,否则从数据库加载
91 */
92 load(key: string): Promise<T>
93
94 /**
95 * 从缓存获取数据(不触发加载)
96 */
97 get(key: string): T | undefined
98
99 /**
100 * 检查是否已缓存
101 */
102 has(key: string): boolean
103
104 /**
105 * 清除指定缓存
106 */
107 evict(key: string): void
108
109 /**
110 * 清除所有缓存
111 */
112 evictAll(): void
113}

Callers 27

getMessageStoreInterfaceFunction · 0.80
extractFunction · 0.80
openPageFunction · 0.80
navigateToMessageFunction · 0.80
buildTreeFunction · 0.65
MessageList.tsxFile · 0.65
buildTreeFunction · 0.65
buildPagesTreeFunction · 0.65
buildConfigTreeFunction · 0.65
handleImportFunction · 0.65
buildPagesTreeFunction · 0.65
buildConfigTreeFunction · 0.65

Calls

no outgoing calls

Tested by

no test coverage detected