The http cache caches the complete html response, when the http-cache is active you can only use ESI-tags or javascript to change the html output. This is not a shopware issue, but the functionality of the caching itself.
https://symfony.com/doc/current/http_cache/esi.html
I am using ProductEvents::PRODUCT_SEARCH_CRITERIA event
I want to add some conditions to product search and load only the condition satisfied products.
how to do this with ESI-tags?