The latest Memcached version is 1.4.5, but the application doesn't support "-d install" parameter to install itself as Windows service.
So right now the 1.4.4 is still the option to go under Windows. Get a package from memcached 1.4.4 for Windows 32-bit from http://downloads.northscale.com/memcached-win32-1.4.4-14.zip.
Unzipped to a folder, then run the following command to install as win services memcached.exe -d install
Start the server from the Microsoft Management Console or by running one of the following commands: memcached.exe -d start
2. Check Memcached installation
You can telnet to the default port 11211 to check the status: telnel localhost 11211
Then use the command stats to check status stats flush_all
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using Newtonsoft.Json; using Enyim.Caching; using Enyim.Caching.Memcached; namespace MemCching { public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { List<User> lst = new List<MemCching.User>(); List<User> lst2 = new List<MemCching.User>(); User ob = new MemCching.User(); ob.UserID = "1"; ob.UserName = "aditya"; lst.Add(ob); JsonSerializerSettings s = new JsonSerializerSettings(); s.NullValueHandling = NullValueHandling.Ignore; s.MissingMemberHandling = MissingMemberHandling.Ignore; s.DefaultValueHandling = DefaultValueHandling.Ignore; bool b = false; bool c = false; string varCache = "SpibayProduct"; MemcachedClient Cache = new MemcachedClient(); string stringList = JsonConvert.SerializeObject(lst, Formatting.None, s); // a = Cache.Remove(varCache) if (Cache.Get(varCache) == null == true) { b = Cache.Store(StoreMode.Add, varCache, stringList, DateTime.Now.AddDays(30)); } else { c = Cache.Store(StoreMode.Replace, varCache, stringList, DateTime.Now.AddDays(30)); }
if (Cache.Get(varCache) == null == false)
{ var str = Cache.Get(varCache); lst2 = JsonConvert.DeserializeObject<List<User>>(str.ToString()); } } } public class User { public string UserID {get;set;} public string UserName {get;set;} } }
Anonymous User
13-Dec-2015Anonymous User
31-Oct-2015The latest Memcached version is 1.4.5, but the application doesn't support "-d install" parameter to install itself as Windows service.
So right now the 1.4.4 is still the option to go under Windows. Get a package from memcached 1.4.4 for Windows 32-bit from http://downloads.northscale.com/memcached-win32-1.4.4-14.zip.
Unzipped to a folder, then run the following command to install as win services
memcached.exe -d install
Start the server from the Microsoft Management Console or by running one of the following commands:
memcached.exe -d start
2. Check Memcached installation
You can telnet to the default port 11211 to check the status:
telnel localhost 11211
Then use the command stats to check status
stats
flush_all