惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Know Your Adversary
Know Your Adversary
博客园 - 叶小钗
量子位
大猫的无限游戏
大猫的无限游戏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 【当耐特】
博客园 - Franky
有赞技术团队
有赞技术团队
博客园 - 聂微东
腾讯CDC
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Jina AI
Jina AI
Last Week in AI
Last Week in AI
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Cloudbric
Cloudbric
WordPress大学
WordPress大学
W
WeLiveSecurity
V2EX - 技术
V2EX - 技术
博客园_首页
S
Security @ Cisco Blogs
The Last Watchdog
The Last Watchdog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Security Latest
Security Latest
L
Lohrmann on Cybersecurity
T
Threat Research - Cisco Blogs
Forbes - Security
Forbes - Security
宝玉的分享
宝玉的分享
The Register - Security
The Register - Security
The Hacker News
The Hacker News
B
Blog RSS Feed
C
CXSECURITY Database RSS Feed - CXSecurity.com
Schneier on Security
Schneier on Security
T
Troy Hunt's Blog
The GitHub Blog
The GitHub Blog
Hacker News: Ask HN
Hacker News: Ask HN
Spread Privacy
Spread Privacy
Hugging Face - Blog
Hugging Face - Blog
博客园 - 三生石上(FineUI控件)
GbyAI
GbyAI
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
罗磊的独立博客
Blog — PlanetScale
Blog — PlanetScale
M
MIT News - Artificial intelligence
T
Tor Project blog
S
Security Affairs
Security Archives - TechRepublic
Security Archives - TechRepublic
NISL@THU
NISL@THU
P
Proofpoint News Feed
C
Cyber Attacks, Cyber Crime and Cyber Security

博客园 - dragonpig

Html 5 Canvas绘制分形图Mandelbrot .net中反射、emit、expression和dynamic的性能比较 const string 和 static readonly string的区别 SqlServer: Top N per Group 微软的BinarySearch 通过CTE实现Split CSV 通过SQL CTE计算Fibonacci 当json.js遇见dynamic.net烂尾篇 .NET线程安全泛型Singleton 跨域访问Cookie WCF JSON和AspnetCompatibility的配置 node.js初体验 教你如何制作Silverlight Visual Tree Inspector 一道非常有趣的概率题 教你30秒打造强类型ASP.NET数据绑定 当json.js遇见dynamic.net [0] 用Silverlight做雷达图 C#运算符重载不是没有用武之地 随机排列算法
Windows安装Memcached
dragonpig · 2011-02-18 · via 博客园 - dragonpig

Download [memcached.exe] [gui] and [.net lib]

memcached-1.2.6-win32-bin.zip
Memcached Manager
Memcached .NET client Library 

Add reference

\trunk\clientlib\src\clientlib\bin\2.0\Release\Memcached.ClientLibrary.dll

[Serializable]
class Student
{
public int ID { get; set; }
public string Name { get; set; }
public DateTime DOB { get; set; }
public override string ToString()
{
return string.Format("id:{0}, name:{1}, dob:{2}", ID, Name, DOB);
}
}
protected void Page_Load(object sender, EventArgs e)
{
MemInit();
MemSet();
MemGet();
}
void MemInit()
{
SockIOPool pool
= SockIOPool.GetInstance();
pool.SetServers(
new[] { "127.0.0.1:11211" });
pool.InitConnections
= 3;
pool.MinConnections
= 3;
pool.MaxConnections
= 5;
pool.SocketConnectTimeout
= 1000;
pool.SocketTimeout
= 3000;
pool.MaintenanceSleep
= 30;
pool.Failover
= true;
pool.Nagle
= false;
pool.Initialize();
}
void MemSet()
{
var mc
= new MemcachedClient();
mc.Set(
"string", "hello");
mc.Set(
"int", 99);
mc.Set(
"datetime", DateTime.Now);
mc.Set(
"person",
new Student { ID = 1, Name = "Mike", DOB = DateTime.Parse("1983/10/14") });
}
void MemGet()
{
var mc
= new MemcachedClient();
WriteLine((
string)mc.Get("string"));
WriteLine((
int)mc.Get("int"));
WriteLine((DateTime)mc.Get(
"datetime"));
WriteLine((Student)mc.Get(
"person"));
}
void WriteLine(object p)
{
Response.Write(p
+ "<br>");
}