Tag: redis

Ubiquitous Client for Redis Server: Netcat

Forget about redis-cli. Just use nc bash-5.0# nc -v 10.x.x.x 6379 10.x.x.x (10.x.x.x:6379) open select 14 +OK What is ncat? NAME nc — arbitrary TCP and UDP connections and listens SYNOPSIS nc [-46AcDCdhklnrtUuvz] [-b boundif] [-i interval] [-p source_port] [-s source_ip_address] [-w timeout] [-X proxy_protocol] [-x proxy_address[:port]] [–apple-delegate-pid […]

Notes on Redis DB

Redis provides atomic operations on keys Keys can have TTL (-2 expired, -1 never expire, n seconds to expire) Values are stored as a list. The list is indexed and can be queried with ranges. List items can be popped, Left/Right pushed. Values can also be stored as […]

The Best Go Library for Redis

There are two popular choices: go-redis redigo I prefer redigo over go-redis. Cons with go-redis Not enough documentation for APIs Difficult to understand naming conventions for APIs I’m still finding how to refresh expiry time of a key using go-redis Needs Cmdable interface for calling Redis commands. The […]

Install Redis on Mac OS via Homebrew

Install Redis on Mac OS via Homebrew Install redis package $ brew install redis Updating Homebrew… ==> Auto-updated Homebrew! After installation, you’d see the following message: ==> Downloading https://homebrew.bintray.com/bottles/redis-5.0.4.mojave.bottle.tar.gz ############################################################# 100.0% ==> Pouring redis-5.0.4.mojave.bottle.tar.gz ==> Caveats To have launchd start redis now and restart at login: brew services […]