title: prevent conflict with spymemcached
body: <p>I'm trying to use spymemcached 2.6 with synchronization on update and I found the two following way to use it:</p>
  
  <ul>
  <li><p>using CASMutation defining a CASMutator which is quite an invasive way to implement it, let see an example:</p>
  
  <pre><code>public List&lt;Item&gt; addAnItem(final Item newItem) throws Exception {
  
      // This is how we modify a list when we find one in the cache.
      CASMutation&lt;List&lt;Item&gt;&gt; mutation = new CASMutation&lt;List&lt;Item&gt;&gt;() {
  
          // This is only invoked when a value actually exists.
          public List&lt;Item&gt; getNewValue(List&lt;Item&gt; current) {
              // Not strictly necessary if you specify the storage as
              // LinkedList (our initial value isn't), but I like to keep
              // things functional anyway, so I'm going to copy this list
              // first.
              LinkedList&lt;Item&gt; ll = new LinkedList&lt;Item&gt;(current);
  
              // If the list is already "full", pop one off the end.
              if(ll.size() &gt; 10) {
                  ll.removeLast();
              }
              // Add mine first.
              ll.addFirst(newItem);
  
              return ll;
          }
      };
  
      // The initial value -- only used when there's no list stored under
      // the key.
      List&lt;Item&gt; initialValue=Collections.singletonList(newItem);
  
      // The mutator who'll do all the low-level stuff.
      CASMutator&lt;List&lt;Item&gt;&gt; mutator = new CASMutator&lt;List&lt;Item&gt;&gt;(client, transcoder);
  
      // This returns whatever value was successfully stored within the
      // cache -- either the initial list as above, or a mutated existing
      // one
      return mutator.cas("myKey", initialValue, 0, mutation);
  }
  </code></pre></li>
  </ul>
  
  <p>or by using <code>cas</code> method</p>
  
  <pre><code>cas(String key, long casId, Object value)
  </code></pre>
  
  <p>after have done:</p>
  
  <pre><code>gets(String key, Transcoder&lt;T&gt; tc) 
  </code></pre>
  
  <p>The second one is really more simple, and I understand why I would use CASMutation... 
  I would be really pleased to get some feedback about the use of this couchbase client.</p>