Cache server that complies with the memcached specified protocol.
- Node JS v12.14.0 or higher
- Yarn v1.21.1 or higher
- Visual Studio Code
Use the package manager Yarn to install the dependencies.
~$ yarn install
~$ docker build -f ./Dockerfile . --no-cache -t braren/cache-server:1.0.1
~$ yarn start
~$ docker run --name mycache -p 11211:11211 -d braren/cache-server:1.0.1
~$ yarn test
~$ # open file with jmeter
~$ ./jmeter_test_plan.jmx
get <key>*\r\n #* means one or more key strings separated by whitespace.
gets <key>*\r\n #* means one or more key strings separated by whitespace.
VALUE <key> <flags> <bytes> [<cas unique>]\r\n
<data block>\r\n
END
set <key> <flags> <exptime> <bytes> [noreply]\r\n
add <key> <flags> <exptime> <bytes> [noreply]\r\n
replace <key> <flags> <exptime> <bytes> [noreply]\r\n
append <key> <flags> <exptime> <bytes> [noreply]\r\n
prepend <key> <flags> <exptime> <bytes> [noreply]\r\n
cas <key> <flags> <exptime> <bytes> <cas unique> [noreply]\r\n
STORED\r\n #to indicate success.
NOT_STORED\r\n #to indicate the data was not stored, but not because of an error. This normally means that the condition for an "add" or a "replace" command wasn't met.
EXISTS\r\n #to indicate that the item you are trying to store with a "cas" command has been modified since you last fetched it.
NOT_FOUND\r\n #to indicate that the item you are trying to store with a "cas" command did not exist.
delete <key> [noreply]\r\n
DELETED\r\n #to indicate success or
NOT_FOUND\r\n #to indicate that the item with this key was not found.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Copyright (c) 2020 Brayan Steven Rendón