Decrement atomically decrements key by delta. The return value is the new value after being decremented or an error. If the value didn't exist in memcached the error is ErrCacheMiss. The value in memcached must be an decimal number, or an error will be returned. On underflow, the new value is capped
(key string, delta uint64)
| 800 | // On underflow, the new value is capped at zero and does not wrap |
| 801 | // around. |
| 802 | func (c *Client) Decrement(key string, delta uint64) (newValue uint64, err error) { |
| 803 | return c.incrDecr("decr", key, delta) |
| 804 | } |
| 805 | |
| 806 | func (c *Client) incrDecr(verb, key string, delta uint64) (uint64, error) { |
| 807 | var val uint64 |