Skip to content

Instantly share code, notes, and snippets.

@mortymacs
Forked from chibicco/memcached_cheat.sh
Created September 27, 2017 07:48
Show Gist options
  • Save mortymacs/a440c01a25e6ba4be3f0fdb84b0d3560 to your computer and use it in GitHub Desktop.
Save mortymacs/a440c01a25e6ba4be3f0fdb84b0d3560 to your computer and use it in GitHub Desktop.
memcached Cheat Sheet, One-liner.
#!/bin/bash
exit 1
# get item list
echo -e 'stats items \n quit' | curl -s -T - telnet://localhost:11211
# get by key
echo -e 'get keyname \n quit' | curl -s -T - telnet://localhost:11211
# flush all
echo -e 'flush_all \n quit' | curl -s -T - telnet://localhost:11211
# delete by key
echo -e 'delet keyname \n quit' | curl -s -T - telnet://localhost:11211
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment