Skip to content

Add extra KV commands: pop, incr, decr, touch - #3

Open
shubham-dce wants to merge 1 commit into
cli-02-core-commandsfrom
cli-03-kv-extra-commands
Open

Add extra KV commands: pop, incr, decr, touch#3
shubham-dce wants to merge 1 commit into
cli-02-core-commandsfrom
cli-03-kv-extra-commands

Conversation

@shubham-dce

Copy link
Copy Markdown
Owner

Summary

Added four more commands from Cache API to the CLI: pop, touch, incr, and decr

Commands Added

  • touch: updates the expire time for a key in the cache without changing its value
  • pop: returns the value for a key and removes the key, optionally also can return expire-time and tag
  • incr: increment a key's value by a delta value, by default it's 1.
  • decr: similar as incr, but reduces the value, decrementing

Testing

  • added 12 new tests validating the implementation including the error and timeout paths.
  • converted the pytest fixture cache to generator, so the resource gets closed, earlier it as left open.
  • current coverage of tests are 98.29%, meeting the projects spec of 98%+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants