MCPcopy
hub / github.com/Unitech/pm2 / set

Method set

modules/pm2-io-agent/src/Utility.js:94–101  ·  view source on GitHub ↗

* Set a value in the cache * * @param {String} key * @param {Mixed} value

(key, value)

Source from the content-addressed store, hash-verified

92 * @param {Mixed} value
93 */
94 set (key, value) {
95 if (!key || !value) return false
96 this._cache[key] = value
97 if (this._ttl_time) {
98 this._ttl[key] = dayjs().add(this._ttl_time, 'seconds')
99 }
100 return true
101 }
102
103 reset () {
104 this._cache = null

Callers 15

getMethod · 0.95
SocketFunction · 0.45
configurable.jsFile · 0.45
test.hwm.jsFile · 0.45
cache.mocha.jsFile · 0.45
bindMethod · 0.45
_workerMethod · 0.45
Configuration.jsFile · 0.45
Worker.jsFile · 0.45
Configuration.jsFile · 0.45

Calls 1

addMethod · 0.65

Tested by

no test coverage detected