Problem/Motivation

When FrankenPHP worker mode reuses Drupal's container, block access decisions survive requests. The inherited access cache keys decisions by account, entity, language, and operation but not the request path.

Steps to reproduce

  1. Place a page title block and configure it to hide on /user/*.
  2. Provide accessible pages at /user/login and /thank-you, bypassing response caching.
  3. Request both pages in that order through the same worker as the same anonymous user. The second page will incorrectly not have a title block.
  4. Restart the worker and reverse the order. The title block will incorrectly appear on /user/login.

Proposed resolution

I'm not sure what the best solution is here. One option would be to call the block access handler's resetCache() at the start of the main request. Caching needs to be preserved within a single request and its subrequests, but should not be preserved across requests.

AI disclosure: I used AI to help prepare the IS and MR (Astra).

Comments

ptmkenny created an issue.