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

Function isCacheEntryExpired

src/Data/CacheStore.js:57–59  ·  view source on GitHub ↗
(entry, forceRefresh = false)

Source from the content-addressed store, hash-verified

55}
56
57export function isCacheEntryExpired(entry, forceRefresh = false) {
58 return forceRefresh || !entry || (Date.now() - entry.updatedAt) > CACHE_EXPIRATION;
59}
60
61export async function readCacheEntry(key, {legacyFields = [], requestEpoch = cacheEpoch} = {}) {
62 if (requestEpoch === cacheEpoch && memoryCache.has(key)) {

Callers 4

getMetadataBatchFunction · 0.90
readFreshCachedRecordsFunction · 0.90
getProgramDescsFunction · 0.90
loadCachedValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected