Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I've been using memcached quite a bit lately and I'm sure what you're trying to do with depencies isn't possible with memcached "as is" but would need to be handled from client side. Also that the data replication should happen server side and not from the client, these are 2 different domains. (With memcached at least, seeing its lack of data storage logic. The point of memcached though is just that, extreme minimalism for bettter performance)</p> <p>For the data replication (protection against a physical failing cluster node) you should check out membased <a href="http://www.couchbase.org/get/couchbase/current">http://www.couchbase.org/get/couchbase/current</a> instead.</p> <p>For the deps algorithm, I could see something like this in a client: For any given key there is a suspected additional key holding the list/array of dependant keys.</p> <pre><code># - delete a key, recursive: function deleteKey( keyname ): deps = client.getDeps( keyname ) # foreach ( deps as dep ): deleteKey( dep ) memcached.delete( dep ) endeach memcached.delete( keyname ) endfunction # return the list of keynames or an empty list if the key doesnt exist function client.getDeps( keyname ): return memcached.get( key_name + "_deps" ) or array() endfunction # Key "demokey1" and its counterpart "demokey1_deps". In the list of keys stored in # "demokey1_deps" there is "demokey2" and "demokey3". deleteKey( "demokey1" ); # this would first perform a memcached get on "demokey1_deps" then with the # value returned as a list of keys ("demokey2" and "demokey3") run deleteKey() # on each of them. </code></pre> <p>Cheers</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload