Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Panel

Table of Contents


Info

CAST supports Memcached via its Node.js extension. Details about how this support is provided for Node.js source code is discussed below.

Objects

IconMetamodel Description

NodeJS Memcached Value

NodeJS Memcached Connection

Links

Link TypeFunction
useInsertLink
  • touch
  • set
  • add
  • cas
useDeleteLink
  • del
useSelectLink
  • get
  • gets
  • getMulti
useUpdateLink
  • replace
  • append
  • prepend
  • incr
  • decr

Code samples

The following declarations will create a connection to the server '192.168.0.102:11211'

Code Block
var Memcached = require('memcached');
var memcached = new Memcached('192.168.0.102:11211');

This statement will create a useInsertLink from code to the value «foo».

Code Block
memcached.add('foo', 'bar', 10, function (err) { /* stuff */ });

This statement will create a useDeleteLink from code to the value «foo».

Code Block
memcached.del('foo', function (err) { /* stuff */ });

For example: