You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

memjs

Package Overview
Dependencies
Maintainers
1
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.1.0
Source
npmnpm
Version published
Weekly downloads
231K
5%
Maintainers
1
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

FAQs

Package last updated on 26 Dec 2017

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