after a few years of using, modifying and hacking MT I've come to a point where I just don't how to achieve something. (If you don't know about Varnish, but know how to do some (CLI) action on comment publishing, you're welcome to read on, too :))
Primer: Currently, I use Intense Debate for commenting. I use it because it's being loaded dynamically. This allows me to have my blog extremely well cached using Varnish (nginx + Varnish + Movable Type Static Publishing = speeds beyond of crazy). But I'd love to get rid od it (privacy concerns etc.).
Now, I'm still more than comfortable with first page loading times if a page is uncached, and this is why I really want to use the internal commenting system again (another benefit: no unnecessary scripts = even more speed).
The thing is: my Varnish setup caches pages for an hour (and I'd like to keep that), which, of course, doesn't play nice along with static commenting systems.
Still reading? Great! So here's what I'd love to have: whenever someone publishes a comment, I want the Varnish cache to be purged (the page commented on, the index, the archive pages).
For this, I need to know how to trigger an action (http request, or, preferably, a CLI action) once the comment has been posted and a page rebuild is due. I suppose this could be done via a plugin, but alas, I don't know how to. If I had a plugin for this purpose, I'd need to pass alone the entry URI being commented on (Varnish is flexible with the rest, , ~ archive would flush the entire archive, ^/$ the index.).
Do you know how to do that? I think a general action on "publishing" and not just commenting would be fine, too, if it's triggered anyway.
Thanks in advance for any help that points me to the right direction. Eternal gratitude (and a mention upon a solution if desired) shall be yours!
Reported on Movable Type 5