Further work and testing around when to return 304. Specifically fixes issues with ESI. Still some to do.