Comments (2)
Correct, this was not added due to lack of interest in the past. Should be an easy extension to the existing SET logic. Contributions welcome!
Basic idea:
- Edit
NetworkSETEXNX
in https://github.com/microsoft/garnet/blob/main/libs/server/Resp/BasicCommands.cs - Add an
if
for [PX] similar to [EX] at https://github.com/microsoft/garnet/blob/main/libs/server/Resp/BasicCommands.cs#L470 - Set a local bool
highPrecision
totrue
if [PX] is specified - Take
highPrecision
as argument toNetworkSET_EX
andNetworkSET_Conditional
- Change https://github.com/microsoft/garnet/blob/main/libs/server/Resp/BasicCommands.cs#L612 and https://github.com/microsoft/garnet/blob/main/libs/server/Resp/BasicCommands.cs#L646 to handle
highPrecision
. It would be something like:
SpanByte.Reinterpret(inputPtr).ExtraMetadata = DateTimeOffset.UtcNow.Ticks + (highPrecision ? TimeSpan.FromMilliseconds(expiry).Ticks : TimeSpan.FromSeconds(expiry).Ticks)
. - Add a unit test in
RespTests.cs
from garnet.
As workaround, you can use PSETEX which is implemented.
from garnet.
Related Issues (20)
- It is not possible to use client tools such as datagrip or redis insight HOT 8
- Crashes on primary during snapshotting disk flush HOT 1
- Stronger TLS validation for Cluster communication
- CLUSTER KEYSLOT mistake HOT 1
- ltrim Command Behavior is Inconsistent with Redis HOT 1
- bgsave Execute command memory inflation HOT 2
- INFO modules in redis do not work in garnet.
- Strange code fragments HOT 1
- Can I quickly import rdb data? HOT 8
- Setting "MemorySize" has no effect on maxmemory HOT 1
- Namespace to isolate the data between users HOT 2
- Protocol RESP3 is not available in the latest version of Garnet. HOT 4
- Please add SLSA provenance to your releases HOT 2
- Looking forward to supporting geo polygon queries. HOT 5
- API - PUBSUB CHANNELS HOT 2
- ArgumentException in GetViewBetween During ZRANGEBYSCORE Benchmark Test
- Commands allowed on subscribe session HOT 1
- Port number does not match expectations HOT 6
- Unpin PoolEntry items in LimitedFixedBufferPool class? HOT 1
- Add a unified prefix-key by auth user/application in service side to enable multiple applications to share the same garnet service HOT 1
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.