Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve cache key defaults for menus #2153

Merged
merged 1 commit into from
Jul 7, 2021

Conversation

oneiros
Copy link
Contributor

@oneiros oneiros commented Jul 6, 2021

What is this pull request for?

With the currently generated templates the way menus are being displayed depends on the (current) page and whether one is in preview mode or not.

This PR adds both facts to the cache key used in the generator's templates.

Closes #2138

Notable changes (remove if none)

This only affects newly generated menu templates.

Checklist

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added tests to cover this change

Sorry, I have no idea if this even needs test and if yes, how this could be tested. If you have suggestions, please let me know and I will gladly add something.

With the currently generated templates the way menus are
being displayed depends on the (current) page and whether
one is in preview mode or not.

Thus both facts should probably go in the cache key as well.
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@tvdeyen tvdeyen merged commit 0b19df0 into AlchemyCMS:main Jul 7, 2021
@tvdeyen
Copy link
Member

tvdeyen commented Jul 7, 2021

@oneiros mind open additional PRs for 5.0, 5.1 and 5.2? I think we need to backport this far back :(

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.

Possibly problematic defaults in menu templates
2 participants