Skip to content

SumoStack/bashcached

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

bashcached

memcached built on bash + socat

Feature

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 and prepend
  • get, delete and touch
  • incr and decr
  • gets and cas
  • flush_all
  • version and quit

Install

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

Usage

$ ./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

License and Copyright

MIT and 🍣 © TSUYUSATO "MakeNowJust" Kitsune <make.just.on@gmail.com> 2016

About

memcached built on bash + socat

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%