Beispiel #1
0
		public CacheGroup(CacheGroupDefinition definition)
		{
			Capped = definition.Capped;
			Id = definition.Id;
			ExpireAfter = definition.ExpireAfter;
			RollingExpiration = definition.RollingExpiration;
			Items = new Dictionary<string, CacheItem>();
		}
Beispiel #2
0
		public void AddGroup(CacheGroupDefinition groupDefinition, CacheDefinition cacheItem = null)
		{
			if (_groups.ContainsKey(groupDefinition.Id))
			{
				throw new Exception("Duplicate cache group id " + groupDefinition.Id);
			}
			var cm = new CacheMessage(CacheAction.AddGroup, _messageTimeout)
			{
				GroupDefinition = groupDefinition,
				CacheItem = cacheItem
			};
			_cacheMessages.Enqueue(cm);
		}
Beispiel #3
0
		public void AddGroup(CacheGroupDefinition groupDefinition, CacheDefinition cacheItem = null)
		{
			throw new NotImplementedException();
		}