TS-1468: Check vary and accept headers on non-200 responses in cache