MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / writeCache

Function writeCache

wxapp/vipshop.js:51–57  ·  view source on GitHub ↗
(cache)

Source from the content-addressed store, hash-verified

49}
50
51function writeCache(cache) {
52 try {
53 fs.writeFileSync(CACHE_FILE, JSON.stringify(cache, null, 2), "utf8");
54 } catch (e) {
55 $.log(`缓存写入失败: ${e.message || e}`);
56 }
57}
58
59function short(value, max = 600) {
60 if (value === undefined || value === null) return "";

Callers 2

saveCacheMethod · 0.70
removeLoginCacheMethod · 0.70

Calls 1

logMethod · 0.45

Tested by

no test coverage detected