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

feature/frozen-dictionary #155

Merged
merged 4 commits into from
Dec 27, 2024

Conversation

jamie-taylor-rjj
Copy link
Collaborator

Rationale for this PR

This PR enhances execution speed and thread safety by making use of the FrozenDictionary class as a cache for the calculated header values.

There is a slight penalty (but not easily perceptible) on first boot of the middleware, but all subsequent requests are now faster than when a standard Dictionary was used.

PR Checklist

Feel free to either check the following items (by place an x inside of the square brackets) or by replacing the square brackets with a relevant emoji from the following list:

  • ✅ to indicate that you have checked something off
  • ❎ to indicate that you haven't checked something off
  • ❓ to indicate that something might not be relevant (writing tests for documentation changes, for instance)

Essential

These items are essential and must be completed for each commit. If they are not completed, the PR may not be accepted.

  • [ ❓ ] I have added tests to the OwaspHeaders.Core.Tests project
  • [ ✅ ] I have run the dotnet-format command and fixed any .editorconfig issues
  • [ ✅ ] I have ensured that the code coverage has not dropped below 65%
  • [ ✅ ] I have increased the version number in OwaspHeaders.Core.csproj (only relevant for code changes)

Optional

  • [ ❓ ] I have documented the new feature in the docs directory
  • [ ❓ ] I have provided a code sample, showing how someone could use the new code

Any Other Information

This section is optional, but it might be useful to list any other information you think is relevant.

@GaProgMan GaProgMan merged commit b1cf862 into GaProgMan:main Dec 27, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants