Skip to content

Commit c32bc06

Browse files
committed
Prime caches to avoid too many DB queries.
1 parent 3ba3f74 commit c32bc06

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

includes/auto-distribute.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,8 @@ function get_external_connections( $post_id = 0, $user_id = 0 ) {
314314
'posts_per_page' => 550,
315315
]
316316
);
317+
// Prime posts and post meta caches. No terms for external connections.
318+
_prime_post_caches( $connections->posts, false, true );
317319

318320
// Get our current connection mapping
319321
$connection_map = (array) get_post_meta( $post_id, 'dt_connection_map', true );

0 commit comments

Comments
 (0)