Problem/Motivation

Request/Response policies can be made private, assuming they do not need to be called directly (like KillSwitch).

Proposed resolution

Make the response policies in node, image and the request policy in basic_auth private.

See #2429671: "The website has encountered an error. Please try again later." page is cached for an example.

We could even consider to remove the DefaultRequestPolicy, that would actually require one class less, not sure if there's also a security reason for having it.

Remaining tasks

User interface changes

API changes

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Task because nothing is broken
Issue priority Normal
Prioritized changes Small performance improvement, we save a few container rountrips (method calls)
Disruption Services are no longer available from outside the service. But they do not offer any public methods except the server listeners, so nobody should have been calling them.

Comments

wim leers’s picture

We could even consider to remove the DefaultRequestPolicy, that would actually require one class less, not sure if there's also a security reason for having it.

We should ping @znerol for that.

bogdan.racz’s picture

Assigned: Unassigned » bogdan.racz
bogdan.racz’s picture

Updated the specified request and response policy services to make them private.
Not sure about the DefaultRequestPolicy removal. I can update the patch if I get a confirmation regarding that.

bogdan.racz’s picture

Status: Active » Needs review
bogdan.racz’s picture

Assigned: bogdan.racz » Unassigned
Issue tags: +drupaldevdays
fabianx’s picture

Assigned: Unassigned » wim leers
Status: Needs review » Reviewed & tested by the community
Issue tags: +D8 Accelerate Dev Days, +Needs beta evaluation

RTBC, but needs a beta eval. Assigning to Wim for final review / beta eval.

berdir’s picture

Issue summary: View changes
Issue tags: -Needs beta evaluation

Added a beta evaluation, looks good to me as well.

fabianx’s picture

Assigned: wim leers » Unassigned

RTBC + 1, beta eval looks good

wim leers’s picture

Benchmarking the page cache/anon user with this, I'm seeing a very slight improvement, but with the margin of error. Pretty much status quo. But that's fine.

RTBC +1

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed ec8033c and pushed to 8.0.x. Thanks!

Thanks for adding the beta evaluation to the issue summary.

  • alexpott committed ec8033c on 8.0.x
    Issue #2453711 by rbmboogie: Use public: false for request and response...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.