Skip to content

Add cache tags#404

Open
fritzmg wants to merge 1 commit intoalnv:masterfrom
fritzmg:patch-1
Open

Add cache tags#404
fritzmg wants to merge 1 commit intoalnv:masterfrom
fritzmg:patch-1

Conversation

@fritzmg
Copy link
Copy Markdown
Contributor

@fritzmg fritzmg commented Apr 23, 2025

I am not sure how much support this repository and branch still gets - so feel free to ignore :)

Currently when editing a record in the back end, the HTTP cache is not cleared, since no cache tags are added in the front end.

Let's say you have a table called foobar in Catalog Manager. When you edit something in the back end, Contao will automatically clear the cache for the following tags:

  • contao.db.foobar
  • contao.db.foobar.42 (with 42 being the ID of the edited record)

This PR adds the following cache tags:

  • contao.db.foobar in the list view - so when a record gets edited, all list views of that table get cleared from the cache.
  • contao.db.foobar.42 in the detail view - so when a record gets edited, the detail URL of that record gets cleared from the cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant