Thanks for considering a contribution. This project takes small, focused pull requests over large rewrites. The README describes what the cache guarantees (key, transactions, invalidation, empty results); a change that weakens one of those guarantees needs to say so explicitly.
-
Warnings are errors.
Directory.Build.propssetsTreatWarningsAsErrors, with a curatedAnalysisMode=Allanalyzer set (NetAnalyzers plus Meziantou). A PR that doesn't build clean locally won't build clean in CI either — run a full build before pushing:dotnet build QueryCache.slnx --configuration Release
-
Public API changes require a
PublicAPI.Unshipped.txtentry.Microsoft.CodeAnalysis.PublicApiAnalyzersis active and fails the build on any unrecorded public member. If you add, change, or remove anything public, updatesrc/<package>/PublicAPI/PublicAPI.Unshipped.txt(python3 .github/scripts/add_missing_public_api.pydoes it for you). A bot promotesUnshipped→Shippedautomatically after each release — don't editShipped.txtby hand. -
Tests are required for behavior changes. Run the unit suite before opening a PR:
dotnet test --project tests/QueryCache.Tests/QueryCache.Tests.csproj --configuration ReleaseChanges to keys, invalidation, transactions or the
HybridCachepath also need the integration suite, which runs SQL Server, PostgreSQL and Redis through Testcontainers (Docker required):dotnet test --project tests/QueryCache.IntegrationTests/QueryCache.IntegrationTests.csproj --configuration ReleaseA cache bug usually shows up as a wrong answer rather than a crash, so a test should assert the data the caller gets back (or how many times the database was queried), not just that no exception was thrown.
-
Benchmarks live in
benchmarks/QueryCache.Benchmarks. A new benchmark class needs a group inbenchmark-groups.json, or CI fails. A PR claiming a performance change should include before/after numbers.
Use Conventional Commits: type(scope): summary, imperative
mood, lowercase summary, no trailing period. Common types: feat, fix, refactor, perf, test,
docs, chore, ci, build. The scope is usually the package or area touched (core, efcore,
dapper, hybrid). Example: fix(efcore): invalidate again when an ambient transaction commits.
- Open pull requests against
develop;masterreceives releases. - One focused change per PR — don't batch unrelated fixes into one commit or one PR.
- If a change is user-visible (new API, behavior change, performance claim), mention it in the PR description; release notes are written separately, not as part of every PR.
- CI runs on Linux, Windows, and macOS — a change that only builds on one OS isn't ready to merge.
Use GitHub Issues for bugs and feature requests. For suspected security vulnerabilities, do not open a public issue — see SECURITY.md for the private reporting channel.
This project follows the Code of Conduct.