Page MenuHomePhabricator

Change cache mode of pageterms API module to public or anon-public-user-private
Closed, ResolvedPublic


The most recent version of the RelatedArticles extension displays up to three related article at the bottom of the page. Whenever possible, a related article is displayed along with its Wikidata description, which is fetched using the pageterms API module.

While exploring edge-caching the results of the RelatedArticles API request, we discovered that the module defaults to the private cache mode (see T126455#2594091). As a result, the API request – indeed, any API request that uses the module – shouldn't be cached at the edge.


  • What are the reasons for the cache mode of the module?
  • What would the implications be for changing the cache mode of the module to public (or anon-public-user-private)?

Related Objects


Event Timeline

phuedx created this task.Aug 31 2016, 11:20 AM
Restricted Application added a project: Wikidata. · View Herald TranscriptAug 31 2016, 11:20 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@dr0ptp4kt: Is there anyone that you think I should ping on this task?

Change 307729 had a related patch set uploaded (by Hoo man):
Mark API modules as publicly cacheable if appropriate

hoo claimed this task.Aug 31 2016, 11:33 AM
hoo moved this task from Proposed to Review on the Wikidata-Sprint-2016-08-16 board.

Thanks for picking this up so quickly @hoo.

dr0ptp4kt added a comment.EditedSep 1 2016, 9:17 PM

@phuedx, as I understand no need for me to mention people to ping. It sounds like once @hoo's patch is merged we could recheck on the beta cluster via a curl that the right cache headers are received? I'm not sure if the beta channel cookie has any bearing on API.php responses, whereas I understand beta channel pages generally aren't cached.

hoo added a comment.Sep 1 2016, 9:28 PM

My patch is still pending merge (but I hope jenkins approves it in the next few minutes). It will only arrive on beta after we did our daily build tomorrow.

If this is important to you, I can make a new beta build after the change has been merged, that's not much effort for me.

Change 307729 merged by jenkins-bot:
Mark API modules as publicly cacheable if appropriate

hoo closed this task as Resolved.Sep 1 2016, 9:48 PM

Patch has been merged into Wikibase master.

hoo added a comment.Sep 1 2016, 9:58 PM

The patch has also been merged into Wikidata master and should appear on beta very soon (a few minutes max).