Gathering detailed insights and metrics for egg-memjs
Gathering detailed insights and metrics for egg-memjs
Gathering detailed insights and metrics for egg-memjs
Gathering detailed insights and metrics for egg-memjs
npm install egg-memjs
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
6 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Apr 21, 2018
Latest Version
1.0.1
Package Id
egg-memjs@1.0.1
Unpacked Size
71.03 kB
Size
9.07 kB
File Count
15
NPM Version
5.5.1
Node Version
8.9.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
一个基于memjs的memcached的egg插件 你可以直接通过egg的context对象来操作缓存
$ npm i egg-memjs --save
1// {app_root}/config/plugin.js 2exports.memcached = { 3 enable: true, 4 package: 'egg-memjs' 5};
1// {app_root}/config/config.default.js 2exports.memcached = { 3 "client": { 4 "hosts": ['10.0.1.1:11211'], // The memcached cluster list. 5 "options":{ 6 // The options hash may contain the options: 7 // 8 // * `retries` - the number of times to retry an operation in lieu of failures 9 // (default 2) 10 // * `expires` - the default expiration in seconds to use (default 0 - never 11 // expire). If `expires` is greater than 30 days (60 x 60 x 24 x 30), it is 12 // treated as a UNIX time (number of seconds since January 1, 1970). 13 // * `logger` - a logger object that responds to `log(string)` method calls. 14 // * `failover` - whether to failover to next server. Defaults to false. 15 // * `failoverTime` - how much to wait until retring a failed server. Default 16 // is 60 seconds. 17 // 18 // ~~~~ 19 // log(msg1[, msg2[, msg3[...]]]) 20 // ~~~~ 21 // 22 // Defaults to `console`. 23 // 24 // Or options for the servers including: 25 // * `username` and `password` for fallback SASL authentication credentials. 26 // * `timeout` in seconds to determine failure for operations. Default is 0.5 27 // seconds. 28 // * 'conntimeout' in seconds to connection failure. Default is twice the value 29 // of `timeout`. 30 // * `keepAlive` whether to enable keep-alive functionality. Defaults to false. 31 // * `keepAliveDelay` in seconds to the initial delay before the first keepalive 32 // probe is sent on an idle socket. Defaults is 30 seconds. 33 } 34 } 35};
##通过app.memcached访问
[Promise] app.memcached.set(key, value, expires)
[Promise] app.memcached.get(key)
[Promise] app.memcached.del(key)
##通过ctx调用
[Promise] ctx.saveToCache(key, value, expires)
[Promise] ctx.loadFromCache(key)
[Promise] ctx.destroyCache(key)
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/6 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More