Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Viewing all articles
Browse latest Browse all 2203

Retrieving and deleting a key in single call from Redis server

$
0
0

For a use case, I want to delete a key upon retrieval from Redis server in a single call i.e. key is a one time use. I'm using lettuce library to connect to redis server.

Is there any specific configuration available in redis side or any specific lettuce API I can use? My sample code looks like below.

RedisAsyncCommands<String, String> command = notificationConnection.async();CompletionStage<String> result = command.get(id)

Lettuce: 5.2.2

Redis: 5.0.8

thanks,

Ashok.


Viewing all articles
Browse latest Browse all 2203

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>