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

Method saveCachedToken

wxapp/gujiajiaju.js:121–132  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

119 }
120
121 saveCachedToken() {
122 if (!this.accessToken || !this.memberId) return;
123 const cache = readTokenCache();
124 cache[this.cacheKey()] = {
125 accessToken: this.accessToken,
126 memberId: this.memberId,
127 nickName: this.userInfo.nickName || "",
128 mobile: this.userInfo.mobile || "",
129 updatedAt: new Date().toISOString(),
130 };
131 writeTokenCache(cache);
132 }
133
134 clearCachedToken() {
135 const cache = readTokenCache();

Callers 2

ensureLoginMethod · 0.95
runMethod · 0.95

Calls 3

cacheKeyMethod · 0.95
readTokenCacheFunction · 0.70
writeTokenCacheFunction · 0.70

Tested by

no test coverage detected