Hello,
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?