- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
Woah! ๐ณ
Could you provide a sample module to reproduce this? ๐ Ideally a sibling test module of
core/modules/dynamic_page_cache/tests/dynamic_page_cache_test
โ that'd make it easy to write a test for this! - ๐ฎ๐ณIndia sorabh.v6 Indore
Hi Wim Leers,
We are experiencing the same problem on a Drupal 10 site. This site is using the commerce module.
Visit this demo site.
https://commerce.demo.centarro.io/productsCheck your developer console, no session is created yet. Then you add a product to the cart and a session is created. Then you go to the catalog page or any other page then check the response in network tab then you will see that there is no X-Drupal-Cache and X-Platform-Cache is a miss too.
Then if you delete the session cookie and reload the page then you will see that the X-Drupal-Cache and X-Platform-Cache is HIT.
This is a major performance issue, because of this if an anonymous user is casually browsing through the site after adding product to cart then every request will reach the drupal server and won't be served from adding overhead to server.
I was initially thinking it to be a commerce issue but then I saw this ticket and thought maybe its a Core issue.
I hope my steps instruction willl make it easy to reprocude the issue.
Thanks
- Status changed to Postponed: needs info
over 1 year ago 6:56am 4 September 2023 - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
Check your developer console, no session is created yet.
First: there's no way to verify this purely on the client side. It's possible that the server side did create/start a session and infrastructure between client and origin prevented that session cookie from reaching the client.
Then you add a product to the cart and a session is created.
Okay.
Then you go to the catalog page or any other page then check the response in network tab then you will see that there is no X-Drupal-Cache and X-Platform-Cache is a miss too.
X-Drupal-Cache
is for the Internal Page Cache (page_cache.module
), not the Dynamic Page Cache (dynamic_page_cache.module
).X-Platform-Cache
is non-Drupal.Dynamic Page Cache's header is
X-Drupal-Dynamic-Cache
:\Drupal\dynamic_page_cache\EventSubscriber\DynamicPageCacheSubscriber::HEADER
. - ๐ฎ๐ณIndia sorabh.v6 Indore
@Wim Leers I am not sure now how to properly provide the steps that would help to reproduce the issue. Can you tell me what more details is needed and how I can provide those details. I mean, how do I check this -
It's possible that the server side did create/start a session and infrastructure between client and origin prevented that session cookie from reaching the client.
Or is it drupal commerce related issue?