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

awaitable full clean #45

Merged
merged 3 commits into from
May 26, 2023
Merged

awaitable full clean #45

merged 3 commits into from
May 26, 2023

Conversation

troepolik
Copy link
Contributor

@troepolik troepolik commented May 26, 2023

Ability to call awaitable Full clean. To be sure it was cleared.
Could you be so kind to approve it or give me feedback what can I fix in it to merge?

@coveralls
Copy link

coveralls commented May 26, 2023

Coverage Status

Coverage: 94.483% (-0.03%) from 94.511% when pulling 072e0a9 on troepolik:main into 34cf7b7 on neon-sunset:main.

src/FastCache.Cached/CacheManager.cs Outdated Show resolved Hide resolved
@neon-sunset
Copy link
Owner

It does make sense to expose a task to wait clear completion in place. However, you will have to add public ExecuteFullEviction too.

@troepolik
Copy link
Contributor Author

Done. But for me is not so clear how to properly run eviction. Please, look at changes closer.
Is I should call ImmediateFullEviction and is IsActive flag checked properly?

@neon-sunset
Copy link
Owner

It will require additional changes to forward either the task of Task.Run(ImmediateFullEviction<K, V>) or StaggeredFullEviction<K, V>.. However, thinking about it some more, it can probably be handled in a more graceful way by "joining" an already running full eviction if any instead of throwing/blocking and re-running/not doing anything.

For now, just remove the ExecuteFullEviction part - I will commit it separately.

@troepolik
Copy link
Contributor Author

Done

@neon-sunset neon-sunset merged commit 0a7df07 into neon-sunset:main May 26, 2023
2 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.

None yet

3 participants