I am working on a Drupal 8 modules which should push a http response header based on a value stored in an entity or a list of entities.
The module was originally done for D7 and now is in porting up to D8.
The main problem is that by using the Entity Cache in D8 any hooks are bypassed, which had been working in still in D7. So nor hook_entity_load or hook_entity_view are fired but only a single time before the entity is placed into the cache.
We might need to create an extra entity/node to a list and this should then eventually change the pages html-head section and the http response header.
So is there any chance to get informed (by a hook or event) for ALL entities be shown on a page (details or list/teaser)? Or can we store some information to a “cached” page (so a page that was assembled only out of cached entities) ?