Comments (4)
Well gets should return an object with key->value mapping.. but if you send JSON, it should set a JSON flag and parse it later again.
from memcached.
Just trying to put together an example script for this. Thanks for the speedy reply.
from memcached.
No need for example script as it's documented behaviour. Still think that .get should probably return key->value object and .gets does the same but with a cas key too. Then you can swap .get and .gets and keep the way you access the data the same; always access arguments[2][key]
But happy to close this if that's not the way you want it done.
from memcached.
This will be changed in the next major rewrite. The reason for this was gets
also returns the cas
value. In v1.0 i will change the API signature from:
memcached.gets('key', function (err, value) {});
to
memcached.gets('key', function (err, value, cas) {})
So the value will be the same type as you would get with a regular get
call
from memcached.
Related Issues (20)
- Is it synchronous? HOT 2
- process hangs after close()
- bug: reconnecting fails if the client was instantiated with server names without ports appended
- return result from memcached.get HOT 2
- [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. HOT 2
- Client does not emit events
- Travis build environment is ancient
- Issue in using memcached library with NUXT
- Clarity on error
- [Proposal] Support for Autobatching
- Please add support for one more command HOT 1
- Delete all keys starting with prefix
- Failover Servers not working when only 1 master server
- Get all the stored keys by memcached method in nodejs HOT 3
- [Question] Does this library support TLS? If so how can I configure and use it? HOT 6
- [Question] Can we get an official release for version 2.3.0?
- how to set credentials?
- memcache client not working when enabling FIPS mode HOT 1
- See if connection is ready, or dead
- Is this project still maintained?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from memcached.