目前我正在做一个项目,需要使用memcached。我研究了很多网络链接,但我不明白如何开始使用 memcached。我已经使用过 mongodb,但希望获得有关 memcached 配置的帮助。
我使用的是 Windows 7 操作系统,到目前为止已经使用了以下链接。
http://www.codeforest.net/how-to-install-memcached-on-windows-machine http://www.codeforest.net/how-to-install-memcached-on-windows-machine
http://memcached.org/ http://memcached.org/
http://www.codeproject.com/KB/aspnet/memcached_aspnet.aspx http://www.codeproject.com/KB/aspnet/memcached_aspnet.aspx
嗯,终于我得到了答案……
我已经浏览了超过 50 个与 memcache 相关的链接,为您提供如何在项目中实现 memcache 的最佳且唯一的链接是
理论知识请参考下面的链接
http://code.google.com/p/memcached/wiki/FAQ#What_is_the_maximum_data_size_you_can_store?_(1_megabyte) http://code.google.com/p/memcached/wiki/FAQ#What_is_the_maximum_data_size_you_can_store?_(1_megabyte)
代码示例是
http://www.koders.com/csharp/fid80DA3A5A619DF298A8902A3E74A94B7A126D0438.aspx?s=socket http://www.koders.com/csharp/fid80DA3A5A619DF298A8902A3E74A94B7A126D0438.aspx?s=socket
我创建了一个小文档,在启动 memcache 之前先看一下
/// difference between set and add and replace
/// add property do not use to add key which is already exist in memcache
/// set use to overwite the key if that is already exist in memcache
/// if key already exist ,replace property can replace it other wise not,where else set property use to replace if key already exist other wise it will add new key in the memcache
///Important
///
/// if u are fetching the key which do not exist in memcache it will return null,as well if u are fetching the key whose value is null in memcache it will return null
/// so avoid inserting the key with null value
///
///If you simply want to avoid key collision between different types of data, simply prefix your key with a useful string. For example: "slash_1", "pradeep_1".
///
///
///
/// FlushAll() method use to remove(Flush) every thing from memcache
///
/// Stats() gives every information about the memcache like total items,connections,pId etc.....
/// difference between increment, decrement
///
/// to use Increment or Decrement first u need to store counter by StoreCounter method else u will get null
///
/// difference between GetMultiple and GetMultipleArray
///
///GetMultiple gives you the object with there key and GetMultipleArray gives you the object not the key
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)