 			if (!cache_dirty[id])
 				callbacks.triggerCallbacks();
 			
+			pending_invalidate[id] = false;
 			cache_dirty[id] = true;
 			
 			if (!cache_entity[id])

		private var delete_later:Object = {}; // id -> Boolean
		private var _dataTableIds:Array = []; // array of EntityTableInfo
		private var _dataTableLookup:Object = {}; // id -> EntityTableInfo
		
        public function EntityCache()
        {

        
		public function clearCache():void
        {
			callbacks.delayCallbacks();
			
			// we don't want to delete the cache because we can still use the cached values for display in the meantime.
			for (var id:* in cache_entity)
				pending_invalidate[id] = true;
			
			callbacks.triggerCallbacks();
			
