Add some internal caching for get_table_info