Problem/Motivation

The dynamic page cache subscriber introduced a request attribute to store the cache policy result.

Proposed resolution

Store the request policy result inside the subscriber object.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 remove_request_policy-2575847-2.patch2.89 KBznerol

Comments

znerol created an issue. See original summary.

znerol’s picture

Status: Active » Needs review
StatusFileSize
new2.89 KB
wim leers’s picture

Component: cache system » dynamic_page_cache.module
wim leers’s picture

Priority: Normal » Minor
Status: Needs review » Reviewed & tested by the community

Makes sense to me.

+++ b/core/modules/dynamic_page_cache/src/EventSubscriber/DynamicPageCacheSubscriber.php
@@ -104,6 +96,13 @@ class DynamicPageCacheSubscriber implements EventSubscriberInterface {
+  protected $requestPolicyResult;

Needs trailing s. Can be fixed on commit.

  • catch committed b97d20d on 8.1.x
    Issue #2575847 by znerol: Remove request policy attribute from dynamic...
catch’s picture

Version: 8.0.x-dev » 8.1.x-dev
Status: Reviewed & tested by the community » Fixed

Looks great. Less request attributes the better.

Committed/pushed to 8.1.x only because this is internal refactoring, removes the constant, adds the protected property etc. I can't see a reason this would need to go into 8.0.x but if there is one please re-open for backport.

Fixed the missing s on the protected property.

wim leers’s picture

Looks great. Less request attributes the better.

Exactly :)

Status: Fixed » Closed (fixed)

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

wim leers’s picture