Sometimes we have a massive build. Massive builds make Arch kids laugh at us, so let's run them sparingly.
Suppose you compile a software, change a USE flag, then recompile again. Rebuilding the same .o files wastes time.
To cache .o files, you might think of using ccache due to its Portage integration.
This is old.
Use sccache instead, discussed in a footnote on the wiki's ccache page ⇗. I find this more relevant to rebuilds of local .ebuild stuff so I discuss it in overlay-funroll ⇒ instead.
Binary caches are a curious thing.
I use binary packages if I'm in a time crunch or if building from source doesn't work for some reason. However Gentoo binary packages are often unavailable for your USE flag list; it's easonable since the amount of builds to cache would be upper-bounded by two-factorial and lower-bounded by "typically-changed USE flag"-factorial.
However, the clever of us run into a sad bug: Bug 337456 ⇗.
Observe:
/etc/portage/env/getbinpkg
FEATURES="${FEATURES} getbinpkg"
/etc/portage/package.use/jumbo-builds
net-libs/webkit-gtk keyring lcms pdf spell
media-libs/gst-plugins-base opengl #dep
/etc/portage/package.env/jumbo-builds
net-libs/webkit-gtk getbinpkg
In the above conf files, one would expect for FEATURES=getbinpkg to be only conditionally enabled for webkit-gtk. But on attempted install, webkit-gtk will still only be built from source.
That's a Gentoo bug since 2010.
Therefore the best thing to do is to
emerge --oneshot --getbinpkg -av $some_jumbo_pkg
every time a @world update asks to upgrade such a package.