ParserCache: Delete old-style key when saving
authorBrad Jorsch <bjorsch@wikimedia.org>
Sun, 11 Jun 2017 15:21:21 +0000 (11:21 -0400)
committerAnomie <bjorsch@wikimedia.org>
Wed, 14 Jun 2017 13:42:36 +0000 (13:42 +0000)
commitda43a0ae3447bd270663ef9f509c58e327d981cc
treedda9cced848514013f7c815ce9e89e3159b69edc
parent3bf87f39002e58f0240ef8676efc5b3280287c53
ParserCache: Delete old-style key when saving

It was noticed that disk usage on the parser cache machines was
increasing since shortly after wmf.4 was redeployed everywhere on the
9th. One theory is that I7fb9ffca9 causes this by making reparses for an
existing old-style cache entry start writing the new-style key where
they would previously have overwritten the old-style key. On that
theory, let's delete that old-style key (that should now be useless) on
save.

I'm assuming here that firing a blind delete for keys that probably
don't exist in the cache (i.e. every new edit) isn't going to hurt
anything. If that's not the case, we'd need to check existence before
deleting.

Bug: T167784
Change-Id: Ie5efb05722cb7da2a90da195a1f244468177175d
includes/parser/ParserCache.php