Command | Compatible Version | Description |
set | Memcached Protocol 1.6 | Sets a key-value pair. If the key does not exist, it will create the key; if it exists, it will overwrite the old value. |
add | | Adds a key-value pair to the cache, but only if the key does not exist. If the key already exists, the command does nothing. |
replace | | Replaces a key-value pair in the cache, but only if the key already exists. If the key does not exist, the command does nothing. |
append | | Appends data to the end of the existing value of a key. If the key does not exist, the command does nothing. |
prepend | | Adds data to the beginning of the existing value of a key. If the key does not exist, the command does nothing. |
cas | | Compare and swap. The command first checks if the current value of the key matches the provided value; if it matches, the key is updated with the new value. |
get | | Retrieves the value of one or more keys from the cache. If the key is not found, an error is returned. |
bget | | Bulk get. This binary protocol command retrieves the values of multiple keys from the cache. |
gets | | Similar to get, it retrieves the value of a key from the cache and returns a version number. |
get_ext | | An extended binary protocol command that allows clients to specify additional options to control the data retrieval process. |
gets_ext | | An extended command with a version number that allows clients to retrieve both the value of a key and its version number, enabling subsequent atomic operations. |
delete | | Deletes a key-value pair from the cache. If the key does not exist, the command does nothing. |
incr | | Increases the value of a key by a specified integer. If the key does not exist, an initial value can be provided. If the key's value is not an integer, the operation fails. |
decr | | Decreases the value of a key by a specified integer. |
この記事はお役に立ちましたか?