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

Method saveCache

wxapp/wps.js:286–298  ·  view source on GitHub ↗
(extra = {})

Source from the content-addressed store, hash-verified

284 }
285
286 saveCache(extra = {}) {
287 const cache = readCache();
288 cache[this.cacheKey] = {
289 ...(cache[this.cacheKey] || {}),
290 openid: this.openid || this.getCached().openid || "",
291 uid: this.uid || this.cookies.uid || "",
292 cookie: cookieHeader(this.cookies),
293 secret: this.secret,
294 ...extra,
295 updatedAt: new Date().toISOString(),
296 };
297 writeCache(cache);
298 }
299
300 removeLogin() {
301 const cache = readCache();

Callers 4

loginMethod · 0.95
requestMethod · 0.95
userInfoMethod · 0.95
tryLotteryOnceMethod · 0.95

Calls 4

getCachedMethod · 0.95
cookieHeaderFunction · 0.85
readCacheFunction · 0.70
writeCacheFunction · 0.70

Tested by

no test coverage detected