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

Method saveCache

wxapp/yichengtong.js:158–170  ·  view source on GitHub ↗
(extra = {})

Source from the content-addressed store, hash-verified

156 }
157
158 saveCache(extra = {}) {
159 const cache = readCache();
160 cache[this.cacheKey] = {
161 ...(cache[this.cacheKey] || {}),
162 ...(this.openid ? { openid: this.openid } : {}),
163 ...(this.token ? { token: this.token } : {}),
164 ...(this.userInfo?.userId ? { userId: this.userInfo.userId } : {}),
165 ...(this.userInfo?.mobile ? { mobile: this.userInfo.mobile } : {}),
166 ...extra,
167 updatedAt: new Date().toISOString(),
168 };
169 writeCache(cache);
170 }
171
172 removeToken() {
173 const cache = readCache();

Callers 3

loginByCodeMethod · 0.95
loginByOperateDataMethod · 0.95
runMethod · 0.95

Calls 2

readCacheFunction · 0.70
writeCacheFunction · 0.70

Tested by

no test coverage detected