The linear diamond chain with fine-tuned effective magnetic flux has a completely flat energy spectrum and compactly-localized eigenmodes, forming an Aharonov-Bohm cage. We study numerically how this localization is affected by different types of disorder (static and time-evolving) relevant to recent realizations of Aharonov-Bohm cages in periodically-modulated optical waveguide arrays. We demonstrate robustness of localization under static and periodically-evolving disorder, while in contrast non-quenched (time-dependent) disorder leads to wavepacket spreading and delocalization.