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.
Problem/Motivation
Some use cases would benefit from limited cache context, e.g. the RequestPath condition as added in #2375695: Condition plugins should provide cache contexts AND cacheability metadata needs to be exposed.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#7 | 2375695-request-path-cache-7.patch | 606 bytes | kim.pepper |
Comments
Comment #1
Fabianx CreditAttribution: Fabianx for Drupal Association commentedComment #2
Fabianx CreditAttribution: Fabianx for Drupal Association commented#2483183: Make breadcrumb block cacheable introduces such a cache context.
Comment #3
dawehnerWell, should we mark this issue now as duplicated?
Comment #4
Fabianx CreditAttribution: Fabianx for Drupal Association commentedMaybe after that other issue is in as its currently at needs work?
Comment #5
Fabianx CreditAttribution: Fabianx for Drupal Association commentedNope, as part of this core/modules/system/src/Plugin/Condition/RequestPath.php should be updated to use it.
@berdir:
Did you intend for url.path to include basePath() or not?
The breadcrumb issue uses getBasePath() . getPathInfo().
Comment #6
Wim Leers#2483183: Make breadcrumb block cacheable was RTBC, got kicked back, and is now RTBC again. Which means that in all likelihood, that issue will land before this one, which means we can use the
'url.path'
cache context being introduced there.Comment #7
kim.pepperLooks pretty simple.
Comment #8
dawehnerIdeally it would allow us to remove some of the longer lists of cache contexts.
Comment #9
Wim LeersYou mean e.g.
PageCacheTagsIntegrationTest
?We don't have any integration tests using the
RequestPath
condition, clearly. So… not sure what else to do here. This is straightforward enough.Comment #10
alexpottCommitted 8b4ceac and pushed to 8.0.x. Thanks!