Page MenuHomePhabricator

Add a maintenance script for complete cache reset
Open, Needs TriagePublic

Description

Problem

There seems to be no way to reset all caches programmatically. One example is the ResourceLoader minification cache. In extension development and when updating mediawiki installations, I ran into issues with improper cache invalidation. A complete manual reset of all caches helped, yet a script would be very helpful.

Who would benefit

Developers and MediaWiki maintainers

Proposed solution

Create a maintenance script which invalidates all caches. Preferably with the option to selectively invalidate some types of caches, e.g. ResourceLoader minification.

Event Timeline

Mglaser created this task.Jan 30 2017, 10:59 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 30 2017, 10:59 PM

This proposal is selected for the Developer-Wishlist voting round and will be added to a MediaWiki page very soon. To the subscribers, or proposer of this task: please help modify the task description: add a brief summary (10-12 lines) of the problem that this proposal raises, topics discussed in the comments, and a proposed solution (if there is any yet). Remember to add a header with a title "Description," to your content. Please do so before February 5th, 12:00 pm UTC.

Great! @srishakatux, just to clarify: according to German Wikipedia, Feb 5th, 12:00pm UTC means Sunday at noon UTC. I am asking as I see a lot of Wikimedia deadlines being set to midnight instead. So, is noon the correct interpretation?

@Mglaser hey, that's right! It's Sunday at noon UTC. As we'll start set up the voting process for these proposals later that day to make them ready for voting by Monday!

I see. Thanks for clarification @srishakatux !

Krinkle updated the task description. (Show Details)Feb 6 2017, 7:44 PM
Tgr added a subscriber: Tgr.Feb 15 2017, 10:28 AM

This was the tenth most popular item in the Developer Wishlist results.

I'd go for one command line option per cache type, which can be freely combined. E.g. resetCache.php --wan --stash --minification.
As T156693: Complete documentation about different types of caching for extension developers points out our documentation about caching is not so great; assuming Manual:Caching does not miss anything important, the following cache layers should be supported:

  • ObjectCache related
    • main WAN
    • local server
    • local cluster
  • CDB
    • interwiki cache
    • localization cache
  • parser cache
  • ResourceLoader cache
    • minification
    • LESS
  • file cache for page HTML
  • reverse proxy (is it reasonable to support mass invalidation for this?)

@Tgr, sounds great! In addition, an option to reset all caches would also be nice.

pbmca added a subscriber: pbmca.Jul 1 2017, 8:00 PM
Qgil added a subscriber: Qgil.Sep 12 2017, 8:35 AM

In relation to T158149: Find an owner for top 10 Developer Wishlist 2017 proposals, I dare to ask: what is the current status? :)

Tgr moved this task from Backlog to Next on the User-Tgr board.Oct 31 2017, 12:01 AM
Tgr moved this task from Next to Backlog on the User-Tgr board.Feb 23 2019, 7:20 AM