(self, key, delta=1, version=None)
| 102 | self._cache.disconnect_all() |
| 103 | |
| 104 | def incr(self, key, delta=1, version=None): |
| 105 | key = self.make_and_validate_key(key, version=version) |
| 106 | try: |
| 107 | # Memcached doesn't support negative delta. |
| 108 | if delta < 0: |
| 109 | val = self._cache.decr(key, -delta) |
| 110 | else: |
| 111 | val = self._cache.incr(key, delta) |
| 112 | # Normalize an exception raised by the underlying client library to |
| 113 | # ValueError in the event of a nonexistent key when calling |
| 114 | # incr()/decr(). |
| 115 | except self.LibraryValueNotFoundException: |
| 116 | val = None |
| 117 | if val is None: |
| 118 | raise ValueError("Key '%s' not found" % key) |
| 119 | return val |
| 120 | |
| 121 | def set_many(self, data, timeout=DEFAULT_TIMEOUT, version=None): |
| 122 | safe_data = {} |
nothing calls this directly
no test coverage detected