  We study radiative heat transfer between two nanoemitters placed inside
different types of closed cavities by means of a fluctuational-electrodynamics
approach. We highlight a very sharp dependence of this transfer on cavity
width, and connect this to the matching between the material-induced resonance
and the resonant modes of the cavity. In resonant configurations, this allows
for an energy-flux amplification of several orders of magnitude with respect to
the one exchanged between two emitters in vacuum as well as between two
black-bodies, even at separation distances much larger than the thermal
wavelength. On the other hand, variations of the cavity width by a few percent
allow a reduction of the flux by several orders of magnitude and even a
transition to inhibition compared to the vacuum scenario. Our results pave the
way to the design of thermal waveguides for the long-distance transport of
super-Planckian heat flux and selective heat transfer in many-body system.
