As discussed in https://github.com/contao/contao/pull/2103#issuecomment-671283944, we are currently always invalidating both the specific tag and the general "category" tag (e.g. contao.db.tl_news.61 and contao.db.tl_news), which kind of renders the specific tag useless. Maybe we can improve this?
We also need to discuss and fix this:
@ausi wrote: If you add a new news article the list module on the website will not be tagged with this new contao.db.tl_news.ID and therefore the new article would not show up. If we invalidate the parent contao.db.tl_news_archive.ID (as we did before this PR) the news list module would show the new article as soon as it was published.
@Toflar wrote: But that's only "by chance". It only works if there is a parent table. If there's not, it wouldn't work. We need special handling for "create".
As discussed in Mumble on August 27th, these tags should be set for e.g. a news item:
tl_news.61, tl_content.11tl_news_archive.1, tl_news.61, tl_news.62, tl_content.11, tl_content.12Then:
tl_news_archive, tl_news_archive.1, tl_news.61, tl_news.62, tl_content.11, tl_content.12tl_news_archive, tl_news_archive.1, tl_news.61, tl_content.11So all parent and child IDs need to be invalidated. Only the top parent record gets a general tag without ID.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
As discussed in Mumble on August 27th, these tags should be set for e.g. a news item:
tl_news.61,tl_content.11tl_news_archive.1,tl_news.61,tl_news.62,tl_content.11,tl_content.12Then:
tl_news_archive,tl_news_archive.1,tl_news.61,tl_news.62,tl_content.11,tl_content.12tl_news_archive,tl_news_archive.1,tl_news.61,tl_content.11So all parent and child IDs need to be invalidated. Only the top parent record gets a general tag without ID.