Note that, as per the Memcached specification:
"If the item's value is not numeric, it is treated as if the value were 0.
If the operation would decrease the value below 0, the new value will be 0."
public function testDecrementWithScope() { $adapter = new Memcache(array('scope' => 'primary')); $this->_conn->set('primary:key1', 1, 60); $this->_conn->set('key1', 1, 60); $adapter->decrement('key1'); $expected = 1; $result = $this->_conn->get('key1'); $this->assertEqual($expected, $result); $expected = 0; $result = $this->_conn->get('primary:key1'); $this->assertEqual($expected, $result); }