Cached routes are not deleted when the cache is cleared

Created on 25 February 2022, over 2 years ago
Updated 18 September 2023, about 1 year ago

Drupal Version

8.9.20

Domain module version

beta6

Expected Behavior

[What did you try to do? What URL did you use to do it?]
When we clear cache on UI then it should show the proper front page for respective domains. Of course, we are using domain site settings module to configure the front pages for each domain.

Actual Behavior

If we clear cache on UI then front page is showing Page Not Found
[What actually happened?]
Domain overrides the CID in domain/domain_config/src/Routing/DomainRouteProvider.php for cached route_matches.

One problem is, DomainRouteProvider uses the current request hostname in the CID. This will probably cause issues when using domain_alias, as you can not invalidate all route_matches in this case.

Another problem is, that this CID is not getting invalidated, not even on the same hostname as the one used as CID. The record still exists in "cache_data". (Deleting this record manually fixes the issue).

Steps to reproduce

  • Create two domains with country path module. For example: example.com/us and example.com/ca
  • Install and configure domain site settings module. Set different front page for both the domains.
  • Clear drupal cache in site(Use performance page, Dont use drush cr), access the front page of the both domains. You will see page not found
🐛 Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

🇮🇳India iyyappan.govind Chennai, India

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024