Flush pipeline cache only if required.