Gathering detailed insights and metrics for @keyv/memcache
Gathering detailed insights and metrics for @keyv/memcache
Gathering detailed insights and metrics for @keyv/memcache
Gathering detailed insights and metrics for @keyv/memcache
npm install @keyv/memcache
Typescript
Module System
95.1
Supply Chain
99.3
Quality
79.6
Maintenance
100
Vulnerability
100
License
TypeScript (99.12%)
CSS (0.37%)
Shell (0.36%)
JavaScript (0.16%)
Total Downloads
6,880,824
Last Day
2,945
Last Week
113,440
Last Month
404,697
Last Year
4,019,417
2,675 Stars
1,434 Commits
152 Forks
19 Watching
2 Branches
68 Contributors
Latest Version
2.0.1
Package Id
@keyv/memcache@2.0.1
Unpacked Size
16.73 kB
Size
4.81 kB
File Count
9
Publised On
21 Aug 2024
Cumulative downloads
Total Downloads
Last day
-14.4%
2,945
Compared to previous day
Last week
14.9%
113,440
Compared to previous week
Last month
13.5%
404,697
Compared to previous month
Last year
48%
4,019,417
Compared to previous year
3
7
Memcache storage adapter for Keyv
1npm install --save @keyv/memcache
or
yarn add @keyv/memcache
1import Keyv from 'keyv'; 2import KeyvMemcache from '@keyv/memcache'; 3 4const memcache = new KeyvMemcache('user:pass@localhost:11211'); 5const keyv = new Keyv({ store: memcache }); 6 7//set 8await keyv.set("foo","bar", 6000) //Expiring time is optional 9 10//get 11const obj = await keyv.get("foo"); 12 13//delete 14await keyv.delete("foo"); 15 16//clear 17await keyv.clear(); 18
1import Keyv from 'keyv'; 2import KeyvMemcache from '@keyv/memcache'; 3 4const memcache = new KeyvMemcache('user:pass@localhost:11211'); 5const keyv1 = new Keyv({ store: memcache, namespace: "namespace1" }); 6const keyv2 = new Keyv({ store: memcache, namespace: "namespace2" }); 7 8//set 9await keyv1.set("foo","bar1", 6000) //Expiring time is optional 10await keyv2.set("foo","bar2", 6000) //Expiring time is optional 11 12//get 13const obj1 = await keyv1.get("foo"); //will return bar1 14const obj2 = await keyv2.get("foo"); //will return bar2 15
1 2//set the server to the correct address and port 3const server = "localhost:11211" 4 5const Keyv = require("keyv"); 6const KeyvMemcache = require("@keyv/memcache"); 7 8const memcache = new KeyvMemcache(server); 9const keyv = new Keyv({ store: memcache});
1 2//best practice is to not hard code your config in code. 3const user = ""; 4const pass = ""; 5const server = "XXX.XXX.XXX.memcachier.com:11211" 6 7const Keyv = require("keyv"); 8const KeyvMemcache = require("@keyv/memcache"); 9 10const memcache = new KeyvMemcache(user +":"+ pass +"@"+ server); 11const keyv = new Keyv({ store: memcache}); 12
Protocol
to memcachedendpoint
(the server) and place it into your code:1 2//best practice is to not hard code your config in code. 3const user = ""; 4const pass = ""; 5const server = "XXX.XXX.XXX.XXX.cloud.redislabs.com:XXX" 6 7const Keyv = require("keyv"); 8const KeyvMemcache = require("@keyv/memcache"); 9 10const memcache = new KeyvMemcache(user +":"+ pass +"@"+ server); 11const keyv = new Keyv({ store: memcache}); 12
1import Keyv from 'keyv'; 2import KeyvMemcache from '@keyv/memcache'; 3 4const memcache = new KeyvMemcache("insert the internal google memcached discovery endpoint"); 5const keyv = new Keyv({ store: memcache}); 6
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
Reason
30 commit(s) and 24 issue activity found in the last 90 days -- score normalized to 10
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
SAST tool is run on all commits
Details
Reason
Found 8/30 approved changesets -- score normalized to 2
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
project is not fuzzed
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2024-12-23
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