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

ENH Use cached table list from ClassInfo #564

Merged
merged 5 commits into from
Mar 28, 2024

Conversation

lekoala
Copy link
Contributor

@lekoala lekoala commented Mar 21, 2024

Description

Fixes #563

Using ClassInfo::hasTable, the cached data is used and avoid extra query per request

Manual testing steps

Install debugbar
Install subsite module
Check that no extra query is made

Issues

Pull request checklist

  • The target branch is correct
  • All commits are relevant to the purpose of the PR (e.g. no debug statements, unrelated refactoring, or arbitrary linting)
    • Small amounts of additional linting are usually okay, but if it makes it hard to concentrate on the relevant changes, ask for the unrelated changes to be reverted, and submitted as a separate PR.
  • The commit messages follow our commit message guidelines
  • The PR follows our contribution guidelines
  • Code changes follow our coding conventions
  • This change is covered with tests (or tests aren't necessary for this change)
  • Any relevant User Help/Developer documentation is updated; for impactful changes, information is added to the changelog for the intended release
  • CI is green

@GuySartorelli
Copy link
Member

GuySartorelli commented Mar 25, 2024

Please retarget to 3 and tick the relevant checkboxes if this is ready for review.

@lekoala lekoala changed the base branch from 3.1 to 3 March 26, 2024 16:27
Copy link
Member

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

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

LGTM

@GuySartorelli
Copy link
Member

Ahh, there's a merge conflict - can you please resolve that?

@lekoala
Copy link
Contributor Author

lekoala commented Mar 28, 2024

ok should be good now

Copy link
Member

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

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

The merge commit isn't ideal but I'll make sure to squash and merge so it should be fine.
Thanks for doing this.

@GuySartorelli GuySartorelli merged commit 6ba7385 into silverstripe:3 Mar 28, 2024
12 checks passed
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.

Middleware should not make table check on each request
2 participants