Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

memjs

Package Overview
Dependencies
Maintainers
2
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

memjs

A memcache client for node using the binary protocol and SASL authentication

  • 1.3.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
150K
decreased by-5.17%
Maintainers
2
Weekly downloads
 
Created

What is memjs?

memjs is a client library for interacting with Memcached servers in Node.js. It provides a simple and efficient way to store, retrieve, and manage cached data using the Memcached protocol.

What are memjs's main functionalities?

Connecting to a Memcached server

This feature allows you to establish a connection to a Memcached server using the memjs client.

const memjs = require('memjs');
const client = memjs.Client.create();

Storing data in the cache

This feature allows you to store data in the Memcached server with an optional expiration time.

client.set('key', 'value', {expires: 10}, function(err, val) {
  if (err) throw err;
  console.log('Value set successfully');
});

Retrieving data from the cache

This feature allows you to retrieve data from the Memcached server using a key.

client.get('key', function(err, val) {
  if (err) throw err;
  console.log('Retrieved value:', val.toString());
});

Deleting data from the cache

This feature allows you to delete data from the Memcached server using a key.

client.delete('key', function(err, val) {
  if (err) throw err;
  console.log('Key deleted successfully');
});

Other packages similar to memjs

Keywords

FAQs

Package last updated on 11 Jan 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc