Using Memcached on Windows and Memcached telnet interface

How to install & run Memcached on Windows

  1. Download package from http://labs.northscale.com/memcached-packages/
  2. Unzip to your desired directory (c:\memcached_win32\ in my example)

Add memcached to the Windows services from the command line

Then you can start or stop the memcached server as a service with

To edit the memcached server configuration, open regedit and go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\memcached, then find and edit the ImagePath

Example running memcached with 256 M and on port 11210

Using Memcached telnet interface

You can communicate with memcached server (localhost or distant) by opening a telnet session.

Memcached text protocol can be found here

It’s a bit confusing, but here some examples

Connecting to server :

Server stats :

Slabs stats :

Items stats :

Set command :

Details on set command :

set <key> <flags> <exptime> <bytes> with <bytes> = number of bytes of data you want to store.

Get command :

Increment & decrement commands :

You can also use phpMemCacheAdmin to execute these command and monitor your queries

Other Memcached Resources

You can find a lot of Memcached resources on this Memcached resources page.

1 Response

  1. Binh Thanh Nguyen says:

    Thanks, nice post

Leave a Reply

Your email address will not be published. Required fields are marked *