Firing cache purge from wp hook

Hi, I have a page that display a content using a shortcode. If I modify the content origin (but not the page itself) the cache is not purged. In effects I didn’t update the page itself. I can fire an hook when I change the “content origin”; so my question is: is there a function I can use inside an hook to fire the cache purge?

Thank you!

You do not state the cache type you are using.

If you are using fastcgi_cache, then you should be able to use wp_remote_get($url) to access the /purge with the site location

So if your page is, then the purge url will be

So you now need to send wp_remote_get the url

Im sure from that info you should be able to make a dynamic hook that any of those types of pages will get purged.

Good Luck !!