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

Method saveCache

wxapp/hisense_aijia.js:313–327  ·  view source on GitHub ↗
(extra = {})

Source from the content-addressed store, hash-verified

311 }
312
313 saveCache(extra = {}) {
314 const cache = readCache();
315 cache[this.cacheKey] = {
316 ...(cache[this.cacheKey] || {}),
317 ...(this.openid ? { openid: this.openid } : {}),
318 ...(this.customerId ? { customerId: this.customerId } : {}),
319 ...(this.accessToken ? { accessToken: this.accessToken } : {}),
320 ...(this.refreshToken ? { refreshToken: this.refreshToken } : {}),
321 ...(this.loginKey ? { loginKey: this.loginKey } : {}),
322 ...(this.phone ? { phone: this.phone } : {}),
323 ...extra,
324 updatedAt: new Date().toISOString(),
325 };
326 writeCache(cache);
327 }
328
329 removeToken() {
330 const cache = readCache();

Callers 6

refreshAccessTokenMethod · 0.95
loginByLoginKeyMethod · 0.95
fetchLoginKeyMethod · 0.95
loginByPhoneAuthMethod · 0.95
ensureLoginMethod · 0.95
queryProfileMethod · 0.95

Calls 2

readCacheFunction · 0.70
writeCacheFunction · 0.70

Tested by

no test coverage detected