MCPcopy
hub / github.com/django/django / decr

Method decr

django/core/cache/backends/base.py:300–305  ·  view source on GitHub ↗

Subtract delta from value in the cache. If the key does not exist, raise a ValueError exception.

(self, key, delta=1, version=None)

Source from the content-addressed store, hash-verified

298 return new_value
299
300 def decr(self, key, delta=1, version=None):
301 """
302 Subtract delta from value in the cache. If the key does not exist,
303 raise a ValueError exception.
304 """
305 return self.incr(key, -delta, version=version)
306
307 async def adecr(self, key, delta=1, version=None):
308 return await self.aincr(key, -delta, version=version)

Callers 5

incrMethod · 0.80
test_decrMethod · 0.80
test_decrMethod · 0.80

Calls 1

incrMethod · 0.95

Tested by 4

test_decrMethod · 0.64
test_decrMethod · 0.64