protected Set GetBobChildrenSetCommand(string parentTableName, int parentTableK) { CacheKey cacheKey = new Caching.CacheKeys.BobChildren(parentTableName, parentTableK, tableName, tableHash); Key key = new Key(cacheKey + "Main", Caching.Instances.Hasher); Set set = new Set(key, Guid.NewGuid().ToString(), DateTime.MaxValue); return set; }
protected Set GetBobChildFieldVersionSetCommand(string parentTableName, int parentTableK, string fieldName) { CacheKey cacheKey = new Caching.CacheKeys.BobChildFieldVersion(parentTableName, parentTableK, tableName, tableHash, fieldName); //SqlContext.Pipe.Send(cacheKey.ToString()); Key key = new Key(cacheKey + "Main", Caching.Instances.Hasher); Set set = new Set(key, Guid.NewGuid().ToString(), DateTime.MaxValue); return set; }
internal int GetMemcachedInstanceIndex(Key key) { return (int)(key.IntValue % memcachedInstances.Count); }
internal MemcachedInstance GetMemcachedInstance(Key key) { return memcachedInstances[GetMemcachedInstanceIndex(key)]; }
internal MemcachedClientException(Key key, System.Net.IPEndPoint endPoint, Exception ex) : base(string.Format("Key: {0} Hash: {1} IntValue: {2} IPEndPoint: {3}", key.Value, key.Hash, key.IntValue, endPoint.ToString()), ex) {}