Page MenuHomePhabricator

Make UrlShortener 404s cacheable
Closed, ResolvedPublic


After discussion with @BBlack, it would be good if we cache the 404s the extension emits for fifteen minutes.


Related Gerrit Patches:
mediawiki/extensions/UrlShortener : masterPurge CDN after creating a new shortcode
mediawiki/extensions/UrlShortener : masterCache invalid redirects as well

Event Timeline

Restricted Application added projects: Operations, User-Ladsgroup. · View Herald TranscriptApr 5 2019, 10:35 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 501541 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/extensions/UrlShortener@master] Cache invalid redirects as well

ema triaged this task as Normal priority.Apr 8 2019, 11:34 AM

Change 501541 merged by jenkins-bot:
[mediawiki/extensions/UrlShortener@master] Cache invalid redirects as well

@Ladsgroup is there anything else left to do here?

Should we have a CDN purge when we create new short codes just in case the 404 was cached?

+1 for purging after creation.

Varnish is configured to cache 4xx errors for a short time (5 minutes, I think), and the above patch extends this to 15 minutes. Longer is probably not needed for errors. Purging would still be great though, for responsiveness in case of the error being cached prior to creation. But, worst case scenario (such as purges being lost, which does happen), it'll self-correct soon enough.

ema moved this task from Triage to Caching on the Traffic board.Apr 17 2019, 1:45 PM

Change 512516 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[mediawiki/extensions/UrlShortener@master] Purge CDN after creating a new shortcode

Change 512516 merged by jenkins-bot:
[mediawiki/extensions/UrlShortener@master] Purge CDN after creating a new shortcode

Legoktm closed this task as Resolved.May 26 2019, 6:20 PM