only patch layers being exported and cache docinfo