redis-cas

Crates.ioredis-cas
lib.rsredis-cas
version1.1.0
sourcesrc
created_at2022-10-10 18:06:16.162111
updated_at2024-03-22 00:37:47.274719
descriptionRedis native module to add support for compare and swap
homepage
repositoryhttps://github.com/Bajix/redis-cas/
max_upload_size
id684800
size5,397
Thomas Sieverding (Bajix)

documentation

README

Redis CAS (Compare and Swap)

License Cargo Documentation

Redis native module to add support for compare and swap

Syntax

CAS key current_value new_value

Compare the value of a key and set if the passed current value hasn't changed

Return

Returns number of modified keys

Example usage

127.0.0.1:6379> set foo bar
OK
127.0.0.1:6379> cas foo bar baz
(integer) 1
127.0.0.1:6379> cas foo bar baz
(integer) 0

Build and load with taskfile

task load-redis-module
Commit count: 5

cargo fmt