Cache attachment ids