diff options
author | 2020-05-24 13:04:41 +0200 | |
---|---|---|
committer | 2020-05-24 13:04:41 +0200 | |
commit | 01bedcadf762262eef0a2b406faf66cdc16a5c85 (patch) | |
tree | b03fa0a94c620b33c2e350699936d68b79bdc765 /tests/helpers.py | |
parent | Make .items return ItemsView instead of AsyncIter (diff) |
Add .increment and .decrement methods.
Sometimes, we just want to store a counter in the cache. In this case,
it is convenient to have a single method that will allow us to increment
or decrement this counter.
These methods allow you to decrement or increment floats and integers by
an specified amount. By default, it'll increment or decrement by 1.
Since this involves several API requests, we create an asyncio.Lock so
that we don't end up with race conditions.
Diffstat (limited to 'tests/helpers.py')
0 files changed, 0 insertions, 0 deletions