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

Method saveCachedToken

wxapp/longfor.js:341–351  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

339 }
340
341 saveCachedToken() {
342 if (!this.token) return;
343 const cache = readCache();
344 cache[this.account] = {
345 token: this.token,
346 lmid: this.lmid,
347 expireAt: this.expire ? Date.now() + this.expire * 1000 : 0,
348 updatedAt: new Date().toISOString(),
349 };
350 writeCache(cache);
351 }
352
353 removeCachedToken() {
354 const cache = readCache();

Callers 1

loginByWxCodeMethod · 0.95

Calls 2

readCacheFunction · 0.70
writeCacheFunction · 0.70

Tested by

no test coverage detected