User Tools

Site Tools


articles:memcached

Create sample file

Create a sample text file

cat /proc/* >> /tmp/memcached.txt

Using a Dalli ruby gem to set a value for memcached .

f=File.read(" /tmp/memcached.txt")
dc = Dalli::Client.new('192.168.2.99:11211',{})
dc.set('test6',f)

Use a netcat to get value from memcached .

echo -en "\x00\x00\x00\x00\x00\x01\x01\x00get test6\r\n" | nc -q1 -u 192.168.2.99 11211

articles/memcached.txt · Last modified: 2018/03/03 20:34 by veera