Hi @adilmo
You can issue an HTTP request that causes the dispatcher to delete cached files, and immediately retrieve and recache the file.
Delete and immediately re-cache files when web sites are likely to receive simultaneous client requests for the same page. Immediate recaching ensures that Dispatcher retrieves and caches the page only once, instead of once for each of the simultaneous client requests.
POST /dispatcher/invalidate.cache HTTP/1.1
CQ-Action: Activate
Content-Type: text/plain
CQ-Handle: /content/something/en_us/123.html
Content-Length: 12
/content/something/en_us/123.html
Also, you can write a flush-cache servlet which can send an invalidate request to Dispatcher and can recache the content. Please take necessary precautions while implementing the flush-cache servlet. Please see the link below for more details:
https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/page-invalidate.html?lang=en#manually-invalidating-the-dispatcher-cache
Hope this helps!
Thanks!