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;
		}
Esempio n. 3
0
		public void Set(string key, object value, DateTime expiry)
		{
			Set set = new Set(new Key(key, hasher), value, expiry);
			CommandExecuter ce = new CommandExecuter(instances);
			try
			{
				ce.Execute(set);
			}
			catch { }
		}
Esempio n. 4
0
		public void Set(string key, string value, DateTime dateTime)
		{
			Set set = new Set(new Key(key, hasher), value, dateTime);
			CommandExecuter ce = new CommandExecuter(instances);
			try
			{
				ce.Execute(set);
			}
			catch { }
		}
Esempio n. 5
0
		public void MultiSet(KeyValuePair<string, object>[] pairs, DateTime dateTime)
		{
			Set[] sets = new Set[pairs.Length];
			for (int i=0;i<sets.Length;i++)
			{
				KeyValuePair<string, object> pair = pairs[i];
				sets[i] = new Set(new Key(pair.Key, hasher), pair.Value, dateTime);
			}
			CommandExecuter ce = new CommandExecuter(instances);
			try
			{
				ce.ExecuteCommands(sets);
			}
			catch { }
		}