added cache for checking partition id