forked from jketterl/memcachejs
-
Notifications
You must be signed in to change notification settings - Fork 1
nunobaba/memcachejs
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is an implementation of the memcache protocol written in javascript. It uses the sockets layer as provided by the node.js "net" module. Simple usage example: Memcache = require('/path/to/memcache.js/memcache'); // Host and port of the constructor are optional. Default values are "localhost" and 11211. var connection = new Memcache(host, port); // setting key "some_key" to the value "some_value" on the memcache server connection.set('some_key', 'some_value'); // same with callback and additional options connection.set('some_key', 'some_value', { expires:60, flags:0, callback: function () { // do something here } }); // retrieve key "some_key" from the memcache server connection.get('some_key', function(response) { if (response.success) { // process results, they are stored in response.data } }); This client uses connection pooling, as suggested by the memcached documentation. If you'd like to turn it off, set Memcache.pooling to false.
About
Implementation of a memcache client written in Javascript
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- JavaScript 100.0%