MCPcopy Index your code
hub / github.com/smallfawn/QLScriptPublic / writeTokenCache

Function writeTokenCache

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

Source from the content-addressed store, hash-verified

43}
44
45function writeTokenCache(cache) {
46 try {
47 fs.writeFileSync(TOKEN_CACHE_FILE, JSON.stringify(cache, null, 2), "utf8");
48 } catch (e) {
49 $.log(`写入token缓存失败: ${e.message || e}`);
50 }
51}
52
53function sha1(text) {
54 return crypto.createHash("sha1").update(String(text)).digest("hex");

Callers 2

saveCachedTokenMethod · 0.70
removeCachedTokenMethod · 0.70

Calls 1

logMethod · 0.45

Tested by

no test coverage detected