Improve context selection cacheability and request-level scope performance
Follow-up to: #3582504 _**NOTE: Before working on this issue, verify it's still relevant and makes sense.**_ **Description:** Several selection-path improvements can be handled together because they are low-risk internal/cacheability fixes. Scope plugins are currently re-instantiated repeatedly, current scope values can be recalculated many times in one selection request, and selector cache metadata is missing route/entity variation even though selection can depend on those contexts. **Scope:** - Add request-level memoization for `AiContextScopeManager::getScopePlugins()`. - Memoize expensive/current scope values in scope plugins where applicable. - Add correct cache contexts/tags for route/site-section and target-entity-dependent selection. - Verify `ai_context_item_list` is correctly invalidated by Drupal core list cache tags; only add custom invalidation if verification shows it is needed. **Acceptance criteria:** - Repeated calls to `getScopePlugins()` in one request reuse plugin instances. - Scope current values are not recomputed unnecessarily during one selection. - `AiContextResult` cache metadata varies by route/path and target entity when those scopes affect selection. - Entity list cache tag behavior is documented by test or code comment if no custom invalidation is required. - Kernel/unit coverage proves cache metadata and memoization behavior. [x] AI Assisted Issue
issue