- Issue created by @krystalcode
- 🇵🇪Peru krystalcode
Implementing the quick - but less efficient - solution for now.
When a redirect is detected, the redirect entity is added to the response as a cacheable dependency. The response then may be cache by, for example, Dynamic Page Cache. When that redirect is changed or deleted, the response is invalidated by the entity cache tags of the redirect.
However, because of the possibility of having redirect chains, a new redirect that affects the response may be created but the response may still be served from the cache - sending the user to the wrong page.
Add the redirect_list
cache tag to redirection responses, or analyze the cases and, for example, load redirects that could be affected by adding a new one in their chain and invalidate the entity cache tags for those redirects.
Ideally, implement the more accurate solution.
Active
1.0
Code
Implementing the quick - but less efficient - solution for now.