Support of Memcached for Node.js
CAST supports Memcached via its
com.castsoftware.nodejs extension.
This page documents the support provided with the latest version of com.castsoftware.nodejs.
Objects
| Icon | Description |
|---|---|
![]() |
NodeJS Memcached Value |
![]() |
NodeJS Memcached Connection |
Supported libraries
| Library | require | Versions |
|---|---|---|
| Memcached | memcached | 0.0.1 to 2.2.2 |
Links
| Link Type | Supported APIs |
|---|---|
| useSelectLink | get gets getMulti |
| useInsertLink | touch set add cas |
| useUpdateLink | replace append prepend incr decr |
| useDeleteLink | del |
Code samples
The following declarations will create a connection to the server ‘192.168.0.102:11211’:
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”:
memcached.add('foo', 'bar', 10, function (err) { /* stuff */ });
This statement will create a useDeleteLink from code to the value “foo”:
memcached.del('foo', function (err) { /* stuff */ });
For example:


