Replicate Memcached to multiple servers


Replicate Memcached to multiple servers



I have the following code:

private bool CheckForDuplicatesInCache(Message theMessage) {     var cacheClient = MemcachedClient.GetInstance("IntegrationCache");     var messageHash = theMessage.GetHashCode();     if (cacheClient.Get(messageHash.ToString()).IsNotNull())     {         IntegrationContext.WriteLog("Warning: This message is a duplicate. Will Not Process.");         return false;     }                 cacheClient.Set(messageHash.ToString(), "nothing", new TimeSpan(2, 0, 0));      return true; } 

The problem is, when I scale this to multiple servers...I need to have multiple memcached intances that share data for redundancy. Does anyone have any insight?


ASP.NET MVC application security

1:

What separates self taught from trained professional devolpers? [closed]
There are 2 ways you could theoretically did it:. What is causing this DatabaseFileLockedException when trying to open a db4o database in an ASP.NET MVC app? There is a product called repcached, however it only runs on linux right now. ASP.NET MVC Experiences/Success Stories [2010]It has the ability to replicate the cache to a different server.. MVC2 Html Helpers The another option is in code: you could write the value to BOTH caches and check for it in both chaches. What is the difference if a Views' “head” tag has attribute “runat” or not?If you add more than 2 servers, you could did it in a for loop.. Asp.net MVC route url
        private bool CheckForDuplicatesInCache(Message theMessage)     {         var cacheClient = MemcachedClient.GetInstance("IntegrationCache");         var cacheClient2 = MemcachedClient.GetInstance("IntegrationCache2");         var messageHash = theMessage.GetHashCode();         if (cacheClient.Get(messageHash.ToString()).IsNotNull())         {             IntegrationContext.WriteLog("Warning: This message is a duplicate. Help with asp.net mvc data access methodsWill Not Process.");             return false;         }          if (cacheClient2.Get(messageHash.ToString()).IsNotNull())         {             IntegrationContext.WriteLog("Warning: This message is a duplicate. Will Not Process.");             return false;         }          cacheClient.Set(messageHash.ToString(), "nothing", new TimeSpan(2, 0, 0));         cacheClient2.Set(messageHash.ToString(), "nothing", new TimeSpan(2, 0, 0));         return true;     } 


50 out of 100 based on 35 user ratings 110 reviews

*