Closed (outdated)
Project:
Drupal core
Version:
8.5.x-dev
Component:
dynamic_page_cache.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 May 2017 at 02:50 UTC
Updated:
7 Nov 2017 at 14:32 UTC
Jump to comment: Most recent
Comments
Comment #2
effulgentsia commentedComment #3
effulgentsia commentedComment #4
effulgentsia commentedComment #5
wim leersThanks so much for creating this issue, and doing such a thorough write-up, @effulgentsia!
Correct.
REST
GETrequests to URLs that just happen to start with/adminwould be pretty much guaranteed to have extremely high cache hit ratios. All of the entity types in Drupal core whose canonical route URL happens to have that prefix are in fact entity types that are typically modified very rarely, thus implying high cache hit ratios.Also correct.
In fact, it's rather unlikely that somebody would add new REST resource plugins that use URLs that have the
/adminpath prefix. So, it's fair to say that most likely, most of the REST requests that would ever use/adminURLs already exist: they're for entities, and\Drupal\rest\Plugin\rest\resource\EntityResourcealready is guaranteed to have correct cacheability metadata (we have lots of test coverage for it thanks to #2737719: EntityResource: Provide comprehensive test coverage: for every entity type, every format, every method and follow-ups, and any bug we find is fixed for all entity types at once).That's a more prudent/safe approach than I would have proposed, but I do think that this is exactly right: take no risk at all with regards to Backwards Compatibility Breaks if at all possible. This avoids lots of frustration and pain, at the minor cost of having some mostly-duplicated code that is deprecated for removal in 9.0.0.
Comment #6
wim leersIn other words: we have good reasons, and I love your concrete proposal.
If you're +1, then I'll work on the patch!
Comment #7
wim leersNote that this soft-blocks #2765959-188: Make 4xx REST responses cacheable by (Dynamic) Page Cache + comprehensive cacheability test coverage.
Comment #8
wim leersClarifying that this is hard-blocked on @effulgentsia.
Comment #10
wim leers#2874938: AdminRouteSubscriber must only mark HTML routes as administrative is in, which makes this issue obsolete! 👌
Comment #11
wim leers