User "Mdale" posted a comment on MediaWiki.r84395. Full URL: https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Special:Code/MediaWiki/84395#c21528 Commit summary:
(bug 27641) purgeThumbnails should support exclusion of expensive files. Add $wgExcludeFromThumbnailPurge and don't purge thumbnails whose extension is in that array when the files they belong to are purged with action=purge. Committing patch by Michael Dale with small coding style tweaks Comment: The plan is to work on deploying TMH starting in September. I will have more specifics early next week. Bryan yes it would be a good solution, to add some method to MediaHandler object handler that had a pagePurge call so that the given media handler could decide if its costly to recreate the derivative or not and purge based on that. And that makes sense because the MediaHandler object is responsible for creating the thumbnails/derivatives in the first place. Also would need a removeDerivatives call that force removed the derivatives that backed functions could call when they are sure they want to remove the thumbnails/ derivatives regardless of how costly it is to create them. And or we tightly couple the remove "costly derivative" rights that TMH adds. At any rate this is a larger change to core. Which I think is fine to do if we commit that to that change at the same time that we commit the change to TMH. It would not be ideal to have trunk or a release in a state that removes all derivatives on pagePurge and extensions have no way to control that purge. ''The configuration option is a good way to address this need without a complex patch''. I don't think its that big a deal if we support these 3 or 4 lines of code to give TMH a much much larger compatibility window while the effort to improve MediaHandler is addressed. I don't see many other extensions making use of this configuration option which would make it a good candidate for rapid deprecation ''once we have a better solution in place''. There are other aspects of MediaHandling that could use clean up as well. Like the ridiculous long sets of arguments that get passed around instead of configuration objects like TMH does. _______________________________________________ MediaWiki-CodeReview mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview
