Debug logging and possible fix for
bug 31177: mystery sidebar message failures
This may be related to things failing on load from External Storage; however we have not yet been able to verify this.
Tweaks MessageCache::loadFromDB() and MessageCache::getMsgFromNamespace() to avoid storing empty cache entries when loading text fails.
When building initial cache if we get a failure we'll log and store a '!TOO BIG' message which requests on-demand load later.
If an on-demand load failures, we'll log and return the false through but won't update the cache with the bad value.
To enable the logging in production, set up a $wgDebugLogFiles entry for 'MessageCache'.
Note that MessageCache::loadFromDB() bypasses Revision's text entry memcaching and may cause a lot of ES fetches at once.
However any ES failures *should* already be logged in the 'ExternalStoreDB' log file.