Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Quoting @catch from #2429617-401: Make D8 2x as fast: Dynamic Page Cache: context-dependent page caching (for *all* users!).3:
// Response has a high-cardinality cache context.
Still think this is mis-named - route/params is high cardinality but not in this list.
Comment | File | Size | Author |
---|---|---|---|
#27 | placeholder_generator_docs-2564577-26.patch | 2.41 KB | Wim Leers |
#13 | improve_comments_on-2564577-13.patch | 2.17 KB | snehi |
#11 | improve_comments_on-2564577-11.patch | 2.17 KB | lauriii |
#3 | improve_comments_in-2564577-3.patch | 3.51 KB | borisson_ |
|
Comments
Comment #2
Wim LeersAssuming #2429617: Make D8 2x as fast: Dynamic Page Cache: context-dependent page caching (for *all* users!) lands, this is what the title should be. We'll need to make the same fixes in both places.
Comment #3
borisson_Initial take on the updated comments.
Comment #4
borisson_Comment #5
lauriiiDocs look good for me. Maybe someone wants to double check the wording? Setting anyway to RTBC.
Comment #6
joelpittetThe wording is good though verbose but I think it needs it. RTBC++
Comment #9
snehi CreditAttribution: snehi as a volunteer and at Publicis Sapient for Publicis Sapient commentedSo here is the review
1. Can we replace this line with
with
2.
How many that in this lines.
3. Can i know what has been changed in this line
Comment #10
Wim LeersAgreed with #9 that this is very confusing.
Note that this has now moved to
\Drupal\Core\Render\PlaceholderGeneratorInterface::shouldAutomaticallyPlaceholder()
. I think it's better to document it on that interface now, and not in the actual implementation.I'm not sure I understand why the comments in here need to be updated.
Why isn't
\Drupal\dynamic_page_cache\EventSubscriber\DynamicPageCacheSubscriber::shouldCacheResponse()
's documentation sufficient?And perhaps we can make
DynamicPageCacheSubscriber::shouldCacheResponse()
callPlaceholderGeneratorInterface:;shouldAutomaticallyPlaceholder()
? And move the docs from the former to the latter, and improve it. Then all docs and all logic live in a single canonical place. That seems better :)Comment #11
lauriiiTried to fix #1. I removed doc changes for #2 because it has good docs in the docblock.
Comment #12
Wim LeersI think #10.1 still applies here: I think it's better to document it on that interface now, and not in the implementation.
i.e. move basically this into the second hunk?
s/cacheable/cacheability/
Comment #13
snehi CreditAttribution: snehi as a volunteer and at Publicis Sapient for Publicis Sapient commentedDoing as suggested in 12.2. @Wim Leers Can you please explain what to do in 12.1.
Comment #14
Wim Leers#13:
I already explained #12.1?
Also, your change causes it to go beyond 80 characters; those lines need to be reflowed.
Comment #15
Wim Leerss/with high cardinality/
s/such high/such a high/
s/configured cache-bin/cache bin that would make caching ineffective/
s/with high cardinality//
s/such high/such a high/
s/configured cache-bin/cache bin that would make caching ineffective/
80 cols violation.
s/Render array/The render array/
s/metadata//
s/create/have/
s/in the configured cache-bin//
Comment #16
snehi CreditAttribution: snehi as a volunteer and at Publicis Sapient for Publicis Sapient commentedThanks for your review.
Done the changes.
Comment #17
Wim Leers80 cols.
80 cols.
80 cols.
Comment #18
snehi CreditAttribution: snehi as a volunteer and at Publicis Sapient for Publicis Sapient commentedComment #19
r_sharma08 CreditAttribution: r_sharma08 at Publicis Sapient for Publicis Sapient commentedApplied patch for Sr. #1 and #2.
For #3, it is not required to change.
Please review.
Comment #21
joelpittet@Wim Leers I think you may have accidently reviewed the wrong patch I checked #16 and it's within 80chars.
@r_sharma08 it's a weird to have fails on comments but why is it not required? None of #16 is in there and it looks like @snehi assigned it to himself so I believe he was going to work on it.
Comment #22
rakesh.gectcr@snehi,
Hope the above comment #21 from @joelpittet , understands you well enough, Because I told you this before.
Looks like @r_sharma08 also your colleague. I have seen couple of other colleagues of yours are doing the same mistakes. But seems like you are well active in the community and doing good job, really appreciating that.
So can you please guide(or mentor) your colleagues to get familiar with right works flows on behalf our community. Please consider this as my humble request.
Comment #23
r_sharma08 CreditAttribution: r_sharma08 at Publicis Sapient for Publicis Sapient commentedComment #24
r_sharma08 CreditAttribution: r_sharma08 at Publicis Sapient for Publicis Sapient commented#16 is OK. Changing status.
Comment #26
borisson_Attached interdiff based on #16 - this fixes the remarks made in #17.
@joelpittet, in #21 you mention that everything was within the 80 cols limit, while that was true, we're supposed to wrap as close to 80 cols as possible. This needed some reflow of the documentation.
From [#1354]:
Comment #27
Wim Leers#21: I didn't mean it exceeded 80 characters, I meant it didn't *use* 80 characters: there is lots of bizarre whitespace left open.
Reroll attached that I think is much simpler and addresses all concerns raised here.
Thoughts?
EDIT: crosspost.
#26:
Stray asterisk there.
Comment #28
borisson_#27 indeed looks much simpler, I'd say we go with that.
Comment #29
Wim Leers#28: Care to RTBC then? :)
BTW: also finished the handbook page at https://www.drupal.org/developing/api/8/render/arrays/cacheability/auto-...
Comment #30
borisson_RTBC it is.
Comment #31
alexpottDocs only change - eligible for patch release. Committed 76525d8 and pushed to 8.0.x and 8.1.x. Thanks!