
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
keyv-memcache
Advanced tools
Memcache storage adapter for Keyv
npm install --save keyv-memcache
or
yarn add keyv-memcache
const Keyv = require('keyv');
const KeyvMemcache = require('keyv-memcache');
const memcache = new KeyvMemcache('user:pass@localhost:11211');
const keyv = new Keyv({ store: memcache });
//set
await keyv.set("foo","bar", 6000) //Expiring time is optional
//get
let obj = await keyv.get("foo");
//delete
await keyv.delete("foo");
//clear
await keyv.clear();
const Keyv = require('keyv');
const KeyvMemcache = require('keyv-memcache');
const memcache = new KeyvMemcache('user:pass@localhost:11211');
const keyv1 = new Keyv({ store: memcache, namespace: "namespace1" });
const keyv2 = new Keyv({ store: memcache, namespace: "namespace2" });
//set
await keyv1.set("foo","bar1", 6000) //Expiring time is optional
await keyv2.set("foo","bar2", 6000) //Expiring time is optional
//get
let obj1 = await keyv1.get("foo"); //will return bar1
let obj2 = await keyv2.get("foo"); //will return bar2
//set the server to the correct address and port
let server = "localhost:11211"
const Keyv = require("keyv");
const KeyvMemcache = require("keyv-memcache");
const memcache = new KeyvMemcache();
const keyv = new Keyv({ store: memcache});
//best practice is to not hard code your config in code.
let user = "";
let pass = "";
let server = "XXX.XXX.XXX.memcachier.com:11211"
const Keyv = require("keyv");
const KeyvMemcache = require("keyv-memcache");
const memcache = new KeyvMemcache(user +":"+ pass +"@"+ server);
const keyv = new Keyv({ store: memcache});
Protocol
to memcachedendpoint
(the server) and place it into your code:
//best practice is to not hard code your config in code.
let user = "";
let pass = "";
let server = "XXX.XXX.XXX.XXX.cloud.redislabs.com:XXX"
const Keyv = require("keyv");
const KeyvMemcache = require("keyv-memcache");
const memcache = new KeyvMemcache(user +":"+ pass +"@"+ server);
const keyv = new Keyv({ store: memcache});
const Keyv = require("keyv");
const KeyvMemcache = require("keyv-memcache");
const memcache = new KeyvMemcache("insert the internal google memcached discovery endpoint");
const keyv = new Keyv({ store: memcache});
MIT © Jared Wray
FAQs
Memcache storage adapter for Keyv
The npm package keyv-memcache receives a total of 6,739 weekly downloads. As such, keyv-memcache popularity was classified as popular.
We found that keyv-memcache demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.