Purpose

Add extra query targets to the render-plan query pre-warmer. When a plan’s query caches are preloaded, this filter lets a plugin append additional queries (by id or identifier) that should be warmed for the plan — e.g. queries that only fire after user interaction but are known to be needed.

Usage

add_filter( 'wr_render_plan_prewarm_queries', array( $this, 'extra_prewarm_targets' ), 10, 3 );

Parameters

  • $targets (list<int|string>): Default []. Query ids or identifiers to warm in addition to the plan’s own.
  • $plan_identifier (string): Identifier of the render plan being warmed.
  • $plan (RenderPlan): The full plan object.

Return the (extended) list.

See also wr_render_plan_prewarm_all_known_queries.