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

Enhancement: Introduce the 'Async' methods to the 'ICache' interface #1080

Closed
mikependon opened this issue Sep 9, 2022 · 1 comment
Closed
Assignees
Labels
enhancement New feature or request fixed The bug, issue, incident has been fixed. todo Things to be done in the future

Comments

@mikependon
Copy link
Owner

Describe the enhancement

To support the asynchronous caching capability, the equivalent asynchronous methods of ICache must be introduced.

AddAsync

Task AddAsync<T>(string key,
            T value,
            int expiration = Constant.DefaultCacheItemExpirationInMinutes,
            bool throwException = true,
            CancellationToken cancellationToken = default);

Task AddAsync<T>(CacheItem<T> item,
            bool throwException = true,
            CancellationToken cancellationToken = default);

ClearAsync

Task ClearAsync(CancellationToken cancellationToken = default);

ContainsAsync

Task<bool> ContainsAsync(string key,
            CancellationToken cancellationToken = default);

GetAsync

Task<CacheItem<T>> GetAsync<T>(string key,
            bool throwException = true,
            CancellationToken cancellationToken = default);

RemoveAsync

Task RemoveAsync(string key,
            bool throwException = true,
            CancellationToken cancellationToken = default);
@mikependon mikependon added the enhancement New feature or request label Sep 9, 2022
@mikependon mikependon self-assigned this Sep 9, 2022
@mikependon mikependon pinned this issue Sep 9, 2022
@mikependon mikependon added the todo Things to be done in the future label Sep 9, 2022
mikependon added a commit that referenced this issue Sep 10, 2022
@mikependon mikependon added the fixed The bug, issue, incident has been fixed. label Sep 10, 2022
@mikependon
Copy link
Owner Author

The support to this will be available on the next versions > RepoDB v1.12.10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed The bug, issue, incident has been fixed. todo Things to be done in the future
Projects
None yet
Development

No branches or pull requests

1 participant