Add support for Drupal cache tags
This pull request is for: (mark with an "x")
- [ ]
examples/* - [x]
modules/next - [ ]
packages/next-drupal - [ ]
starters/basic-starter - [ ]
starters/graphql-starter - [ ]
starters/pages-starter - [ ] Other
GitHub Issue: #763
Someone is attempting to deploy a commit to the Chapter Three Team on Vercel.
A member of the Team first needs to authorize it.
Thanks for this PR @ bojanbogdanovic . Looks like the code is specific to nodes (nid). Can it be changed to be more generic ? Like instead of nid can we have something like entity_type_id entity_id so it works with any content type including custom?
@minnur Yes this is possible, the only concern that I have is that the cache tags tables will grow, due the fact it will register more cache tags dependencies. The implementation is driven by JSON:API includes and focuses on actual pages to be revalidated on the frontend. I could introduce some kind property/flag on the NextEntity type to be able to specify which entity is used as a page. This way we can control the scope of the cache tags dependencies.
Closing this as we've added support in the 2.x RC using a slightly different approach. Still greatly appreciate the contributions here @bojanbogdanovic as it really helped push this feature forward.