only patch layers being exported and cache docinfo
Merge branch 'master' into generator-assets