Add missing code for closing the pageCache when used in migration/tools