Skip to content

Add scoped async alternate lookup support#787

Merged
bitfaster merged 9 commits intomainfrom
copilot/add-iscopedasyncalternatelookup
Apr 28, 2026
Merged

Add scoped async alternate lookup support#787
bitfaster merged 9 commits intomainfrom
copilot/add-iscopedasyncalternatelookup

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 23, 2026

Summary

  • add IScopedAsyncAlternateLookup<TAlternateKey, TKey, TValue> for scoped async alternate-key access
  • expose GetAsyncAlternateLookup/TryGetAsyncAlternateLookup on IScopedAsyncCache and implement them in ScopedAsyncCache and AtomicFactoryScopedAsyncCache
  • add XML docs, unit tests, and an alternate lookup soak test for AtomicFactoryScopedAsyncCache

Validation

  • dotnet format BitFaster.Caching/BitFaster.Caching.csproj
  • dotnet build BitFaster.Caching/BitFaster.Caching.csproj -f net9.0
  • dotnet test BitFaster.Caching.UnitTests/BitFaster.Caching.UnitTests.csproj -f net9.0 --filter "FullyQualifiedName~ScopedAsyncCacheTests|FullyQualifiedName~AtomicFactoryScopedAsyncCacheTests"
  • dotnet test BitFaster.Caching.UnitTests/BitFaster.Caching.UnitTests.csproj -f net9.0 --filter FullyQualifiedName~AtomicFactoryScopedAsyncCacheSoakTests
  • dotnet test BitFaster.Caching.UnitTests/BitFaster.Caching.UnitTests.csproj -f net9.0

Notes

  • automated parallel validation timed out after earlier successful review/codeql completion, so no further validation reruns were attempted

Copilot AI and others added 3 commits April 23, 2026 19:44
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 23, 2026

Coverage Status

coverage: 99.18% (+0.08%) from 99.101% — copilot/add-iscopedasyncalternatelookup into main

@bitfaster
Copy link
Copy Markdown
Owner

@copilot add a soak test for alternate lookup on AtomicFactoryScopedAsyncCache similar to ScopedGetOrAddAlternateLifetimeIsAlwaysAlive.

Agent-Logs-Url: https://github.com/bitfaster/BitFaster.Caching/sessions/b0dac3b4-d350-4fdf-a649-dde98d68135c

Co-authored-by: bitfaster <12851828+bitfaster@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 27, 2026

@copilot add a soak test for alternate lookup on AtomicFactoryScopedAsyncCache similar to ScopedGetOrAddAlternateLifetimeIsAlwaysAlive.

Addressed in f5160d5 by adding an alternate lookup soak test for AtomicFactoryScopedAsyncCache that exercises GetAsyncAlternateLookup<ReadOnlySpan<char>>() with ScopedGetOrAddAsync under concurrency.

@bitfaster bitfaster marked this pull request as ready for review April 28, 2026 01:09
@bitfaster bitfaster merged commit a3e4a65 into main Apr 28, 2026
16 checks passed
@bitfaster bitfaster deleted the copilot/add-iscopedasyncalternatelookup branch April 28, 2026 01:32
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.

3 participants