Clear the backlink cache on file delete
authorCormac Parle <cparle@wikimedia.org>
Wed, 10 Jan 2018 18:02:02 +0000 (18:02 +0000)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 16 Jan 2018 09:32:28 +0000 (09:32 +0000)
commit23ead9bbd6e4b626c6c9924ccd4d83f1174d01d1
tree3954288c1be18efadf5adf35c5b24065095216dc
parentfe4b09380562976aea9f06e59d342fff8d91b026
Clear the backlink cache on file delete

When a file is deleted pages that link to the file
(backlinks) are purged. The set of backlinks for a file
is cached in the backlink cache, and this is where the set
of backlinks that need purging is read from. If, at file delete
time, there is a backlink cache for the file but it is not
up to date, then backlinks missing from the set of cached
backlinks for that file will not be purged, leading to
broken links.

This patch clears the backlink cache on file delete before
initiating purging of backlinks.

Bug: T183478
Change-Id: I3bbd79e5a8fa14bf80ceee81e944108edada322e
includes/cache/BacklinkCache.php
includes/page/WikiPage.php