(data, key)
| 399 | } |
| 400 | |
| 401 | write(data, key) { |
| 402 | this.log(`SET ${key}`); |
| 403 | if (key.indexOf("#") !== -1) { |
| 404 | key = key.substr(1); |
| 405 | if (isSurge || isLoon) { |
| 406 | return $persistentStore.write(data, key); |
| 407 | } |
| 408 | if (isQX) { |
| 409 | return $prefs.setValueForKey(data, key); |
| 410 | } |
| 411 | if (isNode) { |
| 412 | this.root[key] = data; |
| 413 | } |
| 414 | } else { |
| 415 | this.cache[key] = data; |
| 416 | } |
| 417 | this.persistCache(); |
| 418 | } |
| 419 | |
| 420 | read(key) { |
| 421 | this.log(`READ ${key}`); |
no test coverage detected