Issue #2575105 by Berdir, catch, longwave, quietone, kristiaanvandeneynde, andypost, alexpott, mathilde_dumond, pradhumanjain2311, amateescu, Wim Leers, xjm: Use cache collector for state