Add tests for cache clearing with new attachments