Source: http://www.cnblogs.com/wintersun/
Memcached is an open source high performance distributed cache component, which has been widely used in various Internet domains. Client development packages in multiple languages, including: Perl/php/java/c/python/ruby/c#/mysql. This site is already in use Youtube,reddit,zynga,facebook,orange it. See
The figure below compares the image.
It is also a platform for expansion, today we look at the server under Windows and access it using. NET clients. We
Enyim memcached is selected for this client.
First, we install the Windows version of the server, you can download from this site. To use the command line during installation:
Memcached.exe–d Install
This creates a memcached service in Windows service. You can also use –d Uninstall to uninstall it. Runtime will listen by default 11211
ip:127.0.0.1, as shown in:
Next, create a console program that references Enyim.Caching.dll, and in the configuration file:
1: <configuration>
2: <configsections>
3: <name= "enyim.com">
4: <nametype= "Enyim.Caching.Configuration.MemcachedClientSection, enyim.caching" />
5: </sectiongroup>
6: </configsections>
7: <enyim.com>
8: <protocol= "Binary">
9: <servers>
Ten: <addressport= "11211"/>
One: </servers>
: </memcached>
£ </enyim.com>
: </configuration>
Test it:
1: New Memcachedclient ())
2: {
3: "MyTime", DateTime.Now.ToString ());
4: String temp = mc. get<string> ("MyTime");
5:
6: Console.Write (temp);
7: console.read ();
8: }
Hope this article is helpful for your development.
Memcached Express Get started with C #