Cache revision ID to page ID mappings
When we retrieve unpatrolled recent changes, MediaWiki already gives us
the page ID corresponding to each revision ID, so we can store it in a
cache at that point and then use that cache so we don’t have to look up
the page ID via the API explicitly. The only case where that API lookup
is still necessary is when a user manually navigates to /diff/<id>
without going via the any_diff() endpoint.
A cache size of 1024*1024 elements seems to correspond to an internal
size of the underlying store of some 84 million bytes, which should be
totally acceptable on Toolforge.