Kristopher Wood
04/16/2025, 7:33 PMMike Robbins
04/16/2025, 8:00 PMN/cache
module to hold the result of the repetitive logic.
function getAccountMapFromCache() {
const accountCache = cache.getCache({
name: 'ACCOUNT',
scope: cache.Scope.PRIVATE
});
// returns the value from cache. If it's not in the cache, calls the loader function
// and stores the return value in the cache, then returns that value.
return accountCache.get({
key: 'account_map',
loader: getAccountMap,
});
}
function getAccountMap() {
// Perform your repetitive logic here and return the value.
}
const accountMap = getAccountMapFromCache();
mattdahse
04/16/2025, 8:12 PMKristopher Wood
04/16/2025, 10:03 PMKristopher Wood
04/16/2025, 10:04 PMKristopher Wood
04/16/2025, 10:17 PMKristopher Wood
04/16/2025, 10:18 PMKristopher Wood
04/16/2025, 10:18 PMKristopher Wood
04/17/2025, 12:44 AMalien4u
04/17/2025, 1:40 PMalien4u
04/17/2025, 1:41 PM