Details
Description
One of the (many) times the merge hook is called is when creating a list of tables that reference a contact. This list does not pass any contact specific information so it only makes sense to generate it once - let's cache it. Caching it also makes debugging & unit testing a little easy as well as whatever performance increase we might eek out.
Note that the hook is not really the recommended way to add tables to the list of tables referencing a contact - the entityTypes hook is the recommended way.