MCPcopy Index your code
hub / github.com/OpenSIST/OpenSIST.github.io / getRecords

Function getRecords

src/Data/RecordData.js:60–73  ·  view source on GitHub ↗
(isRefresh = false, {priority = FOREGROUND_PRIORITY} = {})

Source from the content-addressed store, hash-verified

58}
59
60export async function getRecords(isRefresh = false, {priority = FOREGROUND_PRIORITY} = {}) {
61 return await loadCachedValue({
62 key: RECORDS_CACHE_KEY,
63 legacyFields: ["data"],
64 forceRefresh: isRefresh,
65 priority,
66 load: async () => {
67 const response = await apiJson(RECORD_LIST, {
68 fetchPriority: priority,
69 });
70 return normalizeRecordList(response.data);
71 },
72 }) ?? {};
73}
74
75export async function setRecords(records) {
76 if (!records) {

Callers 3

StatsBlockFunction · 0.90
prefetchCoreCacheFunction · 0.90
getRecordByRecordIDsFunction · 0.85

Calls 3

loadCachedValueFunction · 0.90
apiJsonFunction · 0.90
normalizeRecordListFunction · 0.85

Tested by

no test coverage detected