Comments (7)
from garnet.
Hi @yeurch! Thanks for bringing that to our attention. That's a mistake in the API Compatibility page, I'll have it updated.
In any case, SETNX is now considered deprecated by Redis (https://redis.io/docs/latest/commands/setnx/), and can be replaced with running SET with the NX argument, so I don't believe we'll be implementing that one, unless there's a specific need.
If you're using SERedis, you can run (string)db.Execute($"SET", key, value, "NX")
instead
from garnet.
Thanks for digging into this @TalZaccai. I hadn't realized that the command was deprecated, sorry. I guess this could be a philosophical debate ... does Garnet intend to be fully compatible with Redis? If so, I'd argue these should be implemented, otherwise it's not 100% compatible. But they've been marked as deprecated for so long by Redis that I guess it's a tough call.
Another interesting point is that StackExchange.Redis
, which you mention in your very first bullet point in the README, appears to use SETNX key val
rather than SET key val NX
. If this client is widely in use, then I think it could cause issues for many users. db.SetString()
seems to be the "normal" way to do sets from SERedis, and having to switch to the lower level db.Execute("SET", ...)
could cause confusion.
from garnet.
@mgravell - do you know under what condition db.StringSet("my_key", "value1", null, When.NotExists)
in SE.Redis would use the deprecated SETNX
versus what Garnet supports, SET .. NX
?
from garnet.
from garnet.
This makes sense, thanks!
from garnet.
Related Issues (20)
- incr a non-number key-value should return error
- API Coverage - Implement SMOVE HOT 6
- API Coverage - Implement SRANDMEMBER
- SPOP with count bug HOT 6
- Char that occupy multiple bytes in string as key or value would make GarnetClient.ExecuteForStringResultAsync() unable to continue execution. HOT 4
- Redundant "Clear" in many buffer allocations
- 微软缓存
- KEYS redis command not working? HOT 5
- Any plans for support for equivalents to RedisSearch and RedisJson modules? HOT 1
- Timeout after particular command sequence HOT 4
- Any plans to support images, incr/decr inventory counting, subscribe to Postrgresql publication HOT 6
- Secret comparisons should be constant time HOT 1
- Passwords are hashed using SHA256 HOT 3
- Metrics HOT 2
- Using ZRANGEBYSCORE with a range that starts after the max score causes an error HOT 2
- Ajust website Intro - Connect with Redis clients
- API Coverage - Implement LSET
- API Coverage - Implement LMPOP HOT 2
- [BUG]: LMOVE operation direction parse error
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 garnet.