Skip to content

Upgrading extension support for better set/eviction triggers#138

Merged
Turnerj merged 1 commit intomasterfrom
improving-extensions
Jan 24, 2021
Merged

Upgrading extension support for better set/eviction triggers#138
Turnerj merged 1 commit intomasterfrom
improving-extensions

Conversation

@Turnerj
Copy link
Copy Markdown
Member

@Turnerj Turnerj commented Jan 23, 2021

The previous IValueRefreshExtension was limited in scope and prevented the remote eviction extension for Redis from working in scenarios where it should. This refactor updates the extension interface to be used for any local changes directly through the CacheStack.

This means calls to SetAsync and EvictAsync now trigger a OnCacheUpdateAsync and OnCacheEvictAsync methods on the newly renamed ICacheChangeExtension.

Through the changes, it also seemed relevant to drop IDisposable for IAsyncDisposable in all cases as there is a core library (Microsoft.Bcl.AsyncInterfaces) that allows IAsyncDisposable in .NET Standard 2.0, making the whole thing easier to use and likely prevents deadlocks from the previous .Wait() calls required in disposal.

Fixes #137

The changes also lead to dropping IDisposable for IAsyncDisposable while keeping .NET Standard 2.0 compatibility
@Turnerj Turnerj added the bug Something isn't working label Jan 23, 2021
@Turnerj Turnerj merged commit 4eaf3f5 into master Jan 24, 2021
@Turnerj Turnerj deleted the improving-extensions branch January 24, 2021 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SetAsync and EvictAsync do not do remote eviction

1 participant