Skip to content

Instantly share code, notes, and snippets.

@stetic
stetic / gist:2929166
Created June 14, 2012 08:56 — forked from bkimble/gist:1365005
Delete local memcached keys with specific prefix using Ruby
#!/usr/bin/env ruby
require 'net/telnet'
key_prefix = 'www.your:prefix'
cache_dump_limit = 1000
localhost = Net::Telnet::new("Host" => "localhost", "Port" => 11211, "Timeout" => 3)
slab_ids = []
localhost.cmd("String" => "stats items", "Match" => /^END/) do |c|
matches = c.scan(/STAT items:(\d+):/)

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name