Memcached for Windows
Zeddy brought this to my table for a review (thanks for him!). Simply said, memcached is a proven distributed memory object caching system, very generic in nature, run in many platforms. People use that to speed up data driven web applications by alleviating database workload, Facebook, Flickr, Youtube, and many big giant social network sites are using memcached to serve million users. That’s why I think it is important to share here how you can take advantage from this technique as well. You can read from memcached documentation about its low level nature. In this post, I will show you how to start quickly.
Build memcached on Windows
First, you can download the latest libevent and memcached source codes from here. I am using version 1.2.6 and compile it using VC++ 2008. There are some *.txt documentations inside the source codes that explain clearly the low level nature of its protocol and implementation. Launch your VC++ (you can use VC++ Express) then open the libevent project and then add memcached project in the same solution.

Make sure you compile libevent before and the location of compiled libevent.lib file. Locate that file in the linker property of memcached project. Looks like below:
Then you can build your memcached project. If you found compile time error on winsock extension (ws2tcpip.h), just delete the following codes then compile again. I hope you have no problem anymore.
INT
WSAAPI
inet_ntop(
__in INT Family,
__in PVOID pAddr,
__out_ecount(StringBufSize) PSTR pStringBuf
);
Once you are done with compilation, you can launch memcached.exe for installation:
memcached –d install
Check on your Windows Service if the memcached service already installed. After that you can start memcached with some options (-help), for example if you want to allocate 2GB RAM and use port 11211:
memcached –d start –m 2024 –p 11211
Make sure to check memcached server if it is running well or not (TCP and UDP).
Using Memcached Manager
using this tool, you can manage your memcached server easily on Windows. You can also use this tool to generate client configuration file for enyim.com Memcached Client that you can use from client.


How to use in ASP.NET
I am using Memcached Provider 1.2 from CodePlex. To shorten this post, I will write another post to guide you how to use Memcached Provider 1.2 with ASP.NET 3.5. However, you can use the two walkthrough articles from CodePlex if you really want to try earlier.
Have nice weekend!.
Ciao – RAM