sunjianfeng610 / spymemcached

Automatically exported from code.google.com/p/spymemcached
0 stars 0 forks source link

CAS not executing mutator if no value is returned from memcached #282

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Using version 9.1

I am using a custom mutator with cas to store a list of string values. I had 
some issues in getting it to work properly, using the examples on the wiki.

After going through the 

  public T cas(final String key, final T initial, int initialExp, final CASMutation<T> m) on CasMutator

method code I noticed that if no value is returned from memcached the initial 
collection provided is persisted as is. Thus requiring that the string be 
inserted into the initial collection before executing cas.

Is this the way it should behave or (very possibly) am I doing something stupid?

Original issue reported on code.google.com by frans.va...@gmail.com on 20 Jul 2013 at 10:04

GoogleCodeExporter commented 9 years ago

Original comment by ingen...@gmail.com on 24 Jul 2013 at 7:37