Score:0

Debugging anonymous session regarding cookie specific page caching

cn flag

Have been following this guide to make caching depend on the value of a specific cookie:

https://cornel.co/article/page-cache-cookiesor-anything-available-http-request-d9

However, it does not seem to work for anonymous users.

Debugging (xdebug) within both

src/StackMiddleware/CookiesPageCache.php

src/CookiesPageCacheServiceProvider.php

is possible when logged in as admin and running "cache rebuild" - but not when anonymous.

My question is - how should one go about debugging in the case of anonymous users?

4uk4 avatar
cn flag
You need two browser sessions, one logged-out for Xdebug and one logged-in to clear the cache (or use drush cr from the command line).
cn flag
Thanks for your response. I've done so, but xdebug is not triggered when running anonymous session which is what I need to work out why the caching is not working as hoped
cn flag
"drush cr" is not doing any difference in regards of triggering the debug for anonymous users.
4uk4 avatar
cn flag
There is no question left to answer. Try different breakpoints, for example in index.php to see if XDebug is working. Look in the F12-tools of the browser to see the requests/response sent and received.
cn flag
Thank you, I seem to be moving on now
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.