Add test coverage for caching of attachments

Mainly so we have regressions to ensure we don't ever cache
editor-previewed attachment requests