Skip to content

Instantly share code, notes, and snippets.

@aanton
aanton / memcache-list-all-keys.rb
Last active August 29, 2015 14:13 — forked from bkimble/gist:1365005
List all keys stored in memcache
#!/usr/bin/env ruby
# List all keys stored in memcache.
# Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place.
# Forked from https://gist.github.com/bkimble/1365005
require 'net/telnet'
headings = %w(id expires bytes cache_key)
rows = []