| @@ -133,8 +133,11 @@ | ||
| 133 | 133 | $post_backup = $post; |
| 134 | 134 | // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited -- To setup the post we need to do this explicitly. |
| 135 | 135 | $post = $this->post_helper->get_post( $indexable->object_id ); |
| 136 | 136 | \setup_postdata( $post ); |
| 137 | + | |
| 138 | + // The below hook primes the post and meta caches for all wp-image-<ID> images. | |
| 139 | + // So the image loop in create_links() hits warm caches — no additional priming is needed there. | |
| 137 | 140 | $content = \apply_filters( 'the_content', $content ); |
| 138 | 141 | \wp_reset_postdata(); |
| 139 | 142 | // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited -- To setup the post we need to do this explicitly. |
| 140 | 143 | $post = $post_backup; |