Thread:Project:Support desk/purging pages/reply (2)

Thanks for the reply. I tested Title::invalidateCache, it has the same problem as my current solution: the page is updated for the user who posted the comment, but not for anybody else.

disableCache is of course one solution, but has performance implications for the whole wiki, so I don't want to force people to do that just because of one extension :)

I save directly in the page only most recent comments that would always be displayed (around 10), together with their number. In this way (i) the comments are displayed immediately without a lag, (ii) I can use the default caching mechanism for storing comments, and not recompute them every time, and (iii) this saves one call to the server. Other comments will be retrieved on demand via ajax (which will happen only if the user clicks on something).