MCPcopy
hub / github.com/electerm/electerm / save

Method save

src/client/common/cache.js:25–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23 }
24
25 save () {
26 const arr = []
27 for (const [key, value] of this.cache) {
28 arr.push({
29 key,
30 value
31 })
32 }
33 safeSetItem(this.key, JSON.stringify(arr))
34 }
35
36 set (key, value) {
37 this.cache.set(key, value)

Callers 2

setMethod · 0.95
clearMethod · 0.95

Calls 1

safeSetItemFunction · 0.90

Tested by

no test coverage detected