LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

memcached

high-performance, distributed memory caching system

TLDR

Start memcached
$ memcached
copy
Start with specific memory
$ memcached -m [256]
copy
Listen on specific port
$ memcached -p [11211]
copy
Run as daemon
$ memcached -d -u [memcache]
copy
Verbose output
$ memcached -vv
copy
Limit connections
$ memcached -c [1024]
copy

SYNOPSIS

memcached [options]

DESCRIPTION

memcached is a high-performance, distributed memory caching system. It stores key-value pairs in RAM to reduce database load and speed up dynamic web applications.memcached uses a simple protocol and is widely used for caching database queries, API responses, and session data.

PARAMETERS

-p port

TCP port (default 11211).
-m MB
Memory limit in megabytes.
-c connections
Max simultaneous connections.
-d
Run as daemon.
-u user
Run as user.
-l ip
Listen address.
-v, -vv
Verbose output.
-t threads
Number of threads.

PROTOCOL COMMANDS

$ set key 0 3600 5\r\nvalue\r\n  # Store
get key\r\n                     # Retrieve
delete key\r\n                  # Remove
incr key 1\r\n                  # Increment
stats\r\n                       # Statistics
copy

INSTALL

sudo apt install memcached
copy
sudo dnf install memcached
copy
sudo pacman -S memcached
copy
sudo apk add memcached
copy
sudo zypper install memcached
copy
brew install memcached
copy
nix profile install nixpkgs#memcached
copy

CAVEATS

No persistence (RAM only). No authentication by default. LRU eviction when full. Not for large values (1MB limit).

HISTORY

memcached was developed by Brad Fitzpatrick at LiveJournal in 2003 to reduce database load. It became foundational for web scaling.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid