I always thought I had portage’s compile cache enabled, but upon recent inspection, it appears that I didn’t. What was missing, was the package dev-util/ccache. I also increased the cache size to 2 GB, as per the Gentoo documentation.
I noticed this because recently, portage started saying this:
!!! Directory does not exist: '/usr/lib/ccache/bin' !!! Disabled FEATURES='ccache'