redis-getcmpset

1.0.0 • Public • Published

This package is a Redis Lua command, to be used with redis-require.

Install it with npm install redis-getcmpset.

GETCMPSET key oldValue newValue

Time complexity: O(1)

Sets key to newValue if the current value equals oldValue. Returns the value originally stored at key. If the set succeeded, the return value will be oldValue. Returns an error when key exists but does not hold a string value.

Return value

Bulk string reply: the value that was stored at key.

Readme

Keywords

Package Sidebar

Install

npm i redis-getcmpset

Weekly Downloads

0

Version

1.0.0

License

ISC

Last publish

Collaborators

  • nathan7