liuhaipeng905 / servicestack

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

Missing intellisense documentation for cas argument in MemcachedClientCache.CheckAndSet method #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I can't tell without looking into the source code why I need to send a ulong 
to this method

namespace ServiceStack.CacheAccess.Memcached
{
    public class MemcachedClientCache
    {
         public bool CheckAndSet(string key, object value, ulong cas);

Original issue reported on code.google.com by jad...@gmail.com on 1 Jun 2010 at 8:22

GoogleCodeExporter commented 9 years ago
I agree, it's actually designed around Memcached's 'Check and Set' mechanic. 
You get the CAS value out with:
object Get(string key, out ulong ucas)

You can then pass in the CAS value into operations that accept it to ensure 
that you only perform an operation if the 
key has not been modified. The idea is that everytime you modify a value the 
CAS value is incremented so the client can 
tell if it's been modified since its been read or not.

Original comment by demis.be...@gmail.com on 1 Jun 2010 at 8:29

GoogleCodeExporter commented 9 years ago
thanks for the explanation

Original comment by jad...@gmail.com on 1 Jun 2010 at 8:45

GoogleCodeExporter commented 9 years ago

Original comment by demis.be...@gmail.com on 1 Jun 2010 at 8:47