It is one file script (small, <100 lines!), and it requires only:
bash
socat
So, you can use it as soon as you download it.
And, it supports multiple connections and implements almost all memcached commands:
set
,add
,replace
,append
andprepend
get
,delete
andtouch
incr
anddecr
gets
andcas
flush_all
version
andquit
You could install via brew
if you use macOS:
$ brew install socat
Or, you could install via apt
if you use Ubuntu:
$ sudo apt install socat
then, download and chmod.
$ curl -LO https://raw.githubusercontent.com/MakeNowJust/bashcached/master/bashcached
$ chmod +x bashcached
$ ./bashcached --help
bashcached - memcached built on bash + socat
(C) TSUYUSATO "MakeNowJust" Kitsune 2016 <make.just.on@gmail.com>
USAGE: bashcached [--port=PORT] [--check=CHECK]
OPTIONS:
--port=PORT port to bind and listen (default: 25252)
--check=CHECK interval to check each cache's expire (default: 60)
$ ./bashcached &
$ telnet localhost 25252
version
VERSION 2.0.0-bashcached
set hello 0 0 11
hello world
STORED
get hello
VALUE hello 0 11
hello world
END
quit
MIT and 🍣 © TSUYUSATO "MakeNowJust" Kitsune <make.just.on@gmail.com> 2016