Fixed the attachment cache builder.