Topic on Project:Support desk

How to check if a page is purged?

9
Subfader (talkcontribs)

In an extension I want to check if a page is purged, but the action=purge parameter is gone tho.

  1. Does action=purge have any effect all?
  2. How to check if a page was purged?
Jackmcbarn (talkcontribs)

What do you mean that action=purge is gone? Also, you can effectively see whether a page was purged by looking at its parse time.

Subfader (talkcontribs)

That's what I ask :) See yourself: Main Page?action=purge.

The parameter is gone after page load and there is no way to grab it.

But I need that e.g. to flush memcached entries.

Jackmcbarn (talkcontribs)

Looking for purges is the wrong approach then. You either want to hook reparses or link table updates, depending on exactly what caching it is that needs cleared.

Subfader (talkcontribs)
Subfader (talkcontribs)

action=purge redirects to the normale page.

Since the context is then "view", requesting the parameter "action" is not possible.

On IRC a dev told me that this coudl be checked using the internal API.

But I'm a bit lost there. Could someone post or link an example?

Jackmcbarn (talkcontribs)

Is your code public? If I saw it, it would be easier for me to understand what your goal is and to explain the best way to do it.

Subfader (talkcontribs)

Sorry for the late reply. I "solved" it by hacking MW. It offered me no proper way to delete memcached when action=purge.

Florianschmidtwelzow (talkcontribs)

ehhh: Do not hack MediaWiki core.

If you have a specific feature request (and a solution for it) maybe you should open a task on Phabricator and, if you want, upload your changes as a patchset to Gerrit. I would be happy to take a look at it :)

Reply to "How to check if a page is purged?"