Socket
Book a DemoInstallSign in
Socket

memcached-client

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

memcached-client

Memcached client for nodejs using typescript

0.2.2
latest
npmnpm
Version published
Weekly downloads
265
162.38%
Maintainers
1
Weekly downloads
 
Created
Source

node-memcached-client

Test npm GitHub release (latest by date) npm NPM

A Memcached client library for node.js. This library written in typescript and define promisified methods.

Install

$ npm install memcached-client

or

$ yarn add memcached-client

Usage

import Memcached, { Metadata } from 'memcached-client'

// Connect to your memcached server.
const client = new Memcached('127.0.0.1', 11211)

const example = async (client: Memcached) => {
  const connection = await client.connect()
  const code = await connection.set('my-key', 'my-value', false, 0)
  console.log(code) // => STORED
  const data: { [key: string]: Metadata } = await connection.get('my-key')
  if (data['my-key']) {
    console.log(data['my-key'].value) // => my-value
  }
  await connection.close()
}

And I prepared some examples.

Roadmap

This library does not yet cover all memcached methods. But I will implement all methods.

memcached-client versionv0.1.x
get
set
delete
getsnot yet
casnot yet
replacenot yet
appendnot yet
prependnot yet
incr/decrnot yet

License

The software is available as open source under the terms of the MIT License.

FAQs

Package last updated on 30 Jul 2022

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.