compared with
Current by Mark Nunberg
on Jul 28, 2013 14:18.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (9)

View Page History
The commands will feature options to:
* Explicitly persist a key to master. A simple command would look like:
** *{_}Ccommand{_}*: _persist_
** *{_}Ppayload{_}* (Payload for Command):
*** *{_}Key:_* _"Some Key"_
*** *Value:* (Optional) The value for the key.

The full set of commands are:
* *{_}persist{_}* - \- Store an item to disk
* *{_}unpersist{_}* - \- Remove an item from dist
* *{_}cache{_}* - \- Store an item to cache
* *{_}uncache{_}* - \- Remove an item from the cache
* *{_}endure{_}* - \- Store an item in the cache and disk
* *{_}purge{_}* - \- Remove an item from both cache and disk
* *{_}keyinfo{_}{*}* *\- Returns information on the key. For each server (master and replicas) on the cluster, a dictionary is returned containing the key's status on its "Cache Store" and its "Persistent Store"


The formal parameters for these commands (in the *payload* field are) (fields with a '*' are required):

|| Name || Value Type || Description ||
| *Key\(*)* | String | _Required._ The key to operate on |
| *OnMaster\(*)* | Boolean | _Required._ Whether this operation should affect the master for this key |
| *OnReplicas\(*)* | Number or list of numbers | _Required_. Which replicas should be affected by this operation. If this is a number,\\
then _n_ replicas will be affected. If this is a list of numbers, each number in the list\\
is taken to be a replica index which should have its entry for _Key_ affected |
| *CAS* | Number | New CAS for the operation. Only valid on commands which store data |
| *Bucket* | String | Bucket on which the key resides on. is "_default_" if this parameter is not supplied |
| *vBucket* | Number | The vBucket for this key. If not supplied, the key is looked up internally\\
within the Mock's vBucket map |