Skip to content

kevinburkenotion/memcached

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Memcached client

We wrote this because we got nervous about the connection pooling logic in the 3rd-Eden/memcached client, along with the lack of maintenance and several other concerning behaviors that that library chooses to do.

Usage

The tests are probably the best place to start, but:

const memcached = require('..')
const pool = new memcached.MemcachedPool(['localhost:11211'], {
    connectionsPerHost: 10,
    // How much time to wait to acquire a free connection
    connectionTimeoutMillis: 1000,
    // How much time to wait for a response from Memcached
    commandTimeoutMillis: 5000,
})
const expirySeconds = 10
await pool.set('key', 'value', expirySeconds)
const key = await pool.get('key')
await pool.del('key')

About

Memcached client with pooling, sharding

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published