@smartcloud/memcached

0.0.5 • Public • Published

@smartcloud/memcached

Memcached Module of SmartCloud Utility Library for Node.js

npm installation

$ npm install --save @smartcloud/memcached

Initialization

The module has core class named "Memcached". To initialize an Memcached object, pass the follow parameters.

* host - (required) specify relevant memcached host. 

* port - (required) specify relevant memcached port. 

* entityKind - (optional) specify entityKind which is also used as target EntityKind in Google cloud datastore. If not defined, "Memcached" will be target entity kind.

* maxRetries - (optional) specify maximum number of times that process can retry in case of failure.  If not specified, default will be 10.

Sample usage

const SmartCloudMemcached = require('@smartcloud/memcached');

var client = new SmartCloudMemcached.Memcached({
    host: 'host',
    port: 1234
});

Methods

  • memcached() method - Return current memcached instance associated with current Memcached instance

  • get(key) method - Return related value (if any) for specified key.

  • set(key, value) method - Store key-value pair.

  • delete(key) method - Delete key-value pair (if any) for specified key.

Readme

Keywords

none

Package Sidebar

Install

npm i @smartcloud/memcached

Weekly Downloads

0

Version

0.0.5

License

Apache-2.0

Last publish

Collaborators

  • spt-arif
  • jacrowland1
  • spt-edison
  • alexkozlov
  • deanscratcherd
  • kin.chan
  • mib1085
  • connorsage