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
Simple key-value storage with support for multiple backends
npm install @keyv/memcache
Typescript
Module System
TypeScript (99.18%)
CSS (0.34%)
Shell (0.33%)
JavaScript (0.15%)
Total Downloads
10,015,651
Last Day
30,725
Last Week
166,260
Last Month
663,685
Last Year
5,659,635
MIT License
2,859 Stars
1,566 Commits
177 Forks
20 Watchers
2 Branches
75 Contributors
Updated on May 15, 2025
Minified
Minified + Gzipped
Latest Version
2.0.1
Package Id
@keyv/memcache@2.0.1
Unpacked Size
16.73 kB
Size
4.81 kB
File Count
9
Published on
Aug 21, 2024
Cumulative downloads
Total Downloads
Last Day
9.4%
30,725
Compared to previous day
Last Week
13.6%
166,260
Compared to previous week
Last Month
-9.2%
663,685
Compared to previous month
Last Year
67.6%
5,659,635
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 28 issue activity found in the last 90 days -- score normalized to 10
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
SAST tool is run on all commits
Details
Reason
Found 2/30 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
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 2025-05-12
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