Page MenuHomePhabricator

Allow CDN caching for logged-in requests without ?uselang to Action API modules via setCacheMode('public')
Open, LowPublic

Description

Action APIs default to a uselang of 'user', which means that their contents are by default sharded by user and so attempting to set setCacheMode('public') will fall back to setCacheMode('anon-public-user-private') with a debug note explaining why.

For APIs where our content doesn't depend on the uselang flag, it'd be great for us to control the cache strategy rather than being out-guessed by the anti-stubbing hack for T85635. Getting all downstream callers to migrate is a little painful, and FWICT we can't even over-ride the value to be default='content'.

Event Timeline

Krinkle renamed this task from Let Action API classes to setCacheMode('public') even if the caller hasn't set 'uselang' to 'content' or whatever to Fix CDN caching for logged-in requests to Action API routes that set setCacheMode('public').Jul 17 2025, 3:35 AM
aaron renamed this task from Fix CDN caching for logged-in requests to Action API routes that set setCacheMode('public') to Allow CDN caching for logged-in requests to Action API modules that set setCacheMode('public') without needing uselang=content from the client.Aug 23 2025, 6:55 AM
aaron renamed this task from Allow CDN caching for logged-in requests to Action API modules that set setCacheMode('public') without needing uselang=content from the client to Allow CDN caching for logged-in requests without ?uselang to Action API modules via setCacheMode('public').Aug 23 2025, 6:57 AM
aaron triaged this task as Low priority.
aaron moved this task from Incoming (Needs Triage) to Backlog on the MW-Interfaces-Team board.