MCPcopy Index your code
hub / github.com/smallfawn/QLScriptPublic / saveCache

Method saveCache

wxapp/ctrip.js:204–217  ·  view source on GitHub ↗
(extra = {})

Source from the content-addressed store, hash-verified

202 }
203
204 saveCache(extra = {}) {
205 const cache = readCache();
206 cache[this.cacheKey] = {
207 ...(cache[this.cacheKey] || {}),
208 ...(this.openid ? { openid: this.openid } : {}),
209 ...(this.ticket ? { ticket: this.ticket } : {}),
210 ...(this.duid ? { duid: this.duid } : {}),
211 ...(this.udl ? { udl: this.udl } : {}),
212 ...(this.uid ? { uid: this.uid } : {}),
213 ...extra,
214 updatedAt: new Date().toISOString(),
215 };
216 writeCache(cache);
217 }
218
219 removeTicket() {
220 const cache = readCache();

Callers 2

loginMethod · 0.95
runMethod · 0.95

Calls 2

readCacheFunction · 0.70
writeCacheFunction · 0.70

Tested by

no test coverage detected