next-drupal icon indicating copy to clipboard operation
next-drupal copied to clipboard

Add support for Drupal cache tags

Open bojanbogdanovic opened this issue 1 year ago • 3 comments

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

bojanbogdanovic avatar Sep 07 '24 10:09 bojanbogdanovic

Someone is attempting to deploy a commit to the Chapter Three Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Sep 07 '24 10:09 vercel[bot]

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 avatar Oct 01 '24 14:10 minnur

@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.

bojanbogdanovic avatar Oct 02 '24 08:10 bojanbogdanovic

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.

backlineint avatar Jan 31 '25 15:01 backlineint