MCPcopy Index your code
hub / github.com/apitable/apitable / addCellCache

Method addCellCache

packages/core/src/cache_manager/cache.ts:91–107  ·  view source on GitHub ↗
(dsId: string, fieldId: string, recordId: string, value: ICellValueData)

Source from the content-addressed store, hash-verified

89 }
90
91 addCellCache(dsId: string, fieldId: string, recordId: string, value: ICellValueData) {
92 // Check if the table cache exists
93 let dsCache = this.getDsCache(dsId);
94 if (!dsCache) {
95 dsCache = {
96 cellValues: new Map(),
97 };
98 this.dsMap.set(dsId, dsCache);
99 }
100 // Check if the column cache exists
101 let fieldCache = dsCache.cellValues.get(fieldId);
102 if (!fieldCache) {
103 fieldCache = new Map();
104 dsCache.cellValues.set(fieldId, fieldCache);
105 }
106 fieldCache.set(recordId, value);
107 }
108
109 removeCellCache(dsId: string, fieldId: string, recordId?: string) {
110 const ds = this.getDsCache(dsId);

Callers 1

index.tsFile · 0.80

Calls 3

getDsCacheMethod · 0.95
setMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected