You can use page fragments to get close enough. I hacked this together in Varnish with custom headers handled by the backend before it was an actual feature. A bit of a pain but eminently doable, even years ago