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

[FEATURE] Add async operations for CacheManager and ICacheRepository classes #88

Open
guibranco opened this issue Sep 7, 2020 · 1 comment
Labels
cache enhancement New feature or request gitauto GitAuto label to trigger the app in a issue. good first issue Good for newcomers hacktoberfest Participation in the Hacktoberfest event help wanted Extra attention is needed

Comments

@guibranco
Copy link
Owner

guibranco commented Sep 7, 2020

Description

Enhance the CacheManager class and its implementations to support asynchronous operations. This update will improve the performance and scalability of cache operations by allowing non-blocking interactions with the cache.

Tasks

  1. Update CacheManager Methods:

    • Modify the CacheManager class to include asynchronous versions of its methods. For example, add async and await to the existing methods for operations like Get, Set, and Remove.
  2. Implement Asynchronous Methods in Repositories:

    • Update the following ICacheRepository implementations to support asynchronous operations:

Tech Notes

  1. Updating CacheManager:

    • Identify all methods in CacheManager that perform I/O operations or can benefit from async execution.
    • Modify these methods to be asynchronous by using async and await. For example:
      public async Task<T> GetAsync<T>(string key)
      {
          // Async logic here
      }
  2. Updating ICacheRepository Implementations:

    • CouchDBCacheRepository:

      • Update methods to use asynchronous CouchDB client operations.
      • Example: Replace synchronous client.Get() with await client.GetAsync().
    • MemoryCacheRepository:

      • Although in-memory operations are typically fast, updating to async will help maintain consistency across the application.
      • Example: Wrap existing methods with Task.Run() for async behavior if needed.
    • RedisCacheRepository:

      • Utilize asynchronous Redis client methods, e.g., IDatabase.StringGetAsync(), IDatabase.StringSetAsync().
      • Ensure that all Redis operations in RedisCacheRepository are non-blocking.
  3. Testing:

    • Update or create unit tests to verify the correctness and performance of asynchronous methods.
    • Ensure tests cover various scenarios, including handling of exceptions and timeouts.

Additional Notes

  • Ensure that the new asynchronous methods are properly documented.
  • Review code for potential performance impacts and make optimizations as needed.
  • Collaborate with the team to identify and address any existing issues related to synchronous operations before applying async changes.
@guibranco guibranco added cache enhancement New feature or request labels Sep 7, 2020
@guibranco guibranco self-assigned this May 6, 2021
@guibranco guibranco removed their assignment Jun 30, 2023
@guibranco guibranco added the help wanted Extra attention is needed label Jun 30, 2023
@guibranco guibranco added hacktoberfest Participation in the Hacktoberfest event good first issue Good for newcomers labels Oct 7, 2023
@guibranco guibranco changed the title Add async operations for CacheManager and ICacheRepository classes Add async operations for CacheManager and ICacheRepository classes Oct 25, 2023
@guibranco guibranco changed the title Add async operations for CacheManager and ICacheRepository classes [FEATURE] Add async operations for CacheManager and ICacheRepository classes May 15, 2024
@gitauto-ai gitauto-ai bot added the gitauto GitAuto label to trigger the app in a issue. label Aug 22, 2024
Repository owner deleted a comment from gitauto-ai bot Sep 13, 2024
@guibranco guibranco removed the gitauto GitAuto label to trigger the app in a issue. label Sep 13, 2024
mf0zz13 added a commit to mf0zz13/CrispyWaffle that referenced this issue Sep 17, 2024
@gitauto-ai gitauto-ai bot added the gitauto GitAuto label to trigger the app in a issue. label Sep 23, 2024
Copy link
Contributor

gitauto-ai bot commented Sep 23, 2024

Sorry, we have an error. Please try again.

Have feedback or need help?
Feel free to email [email protected].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cache enhancement New feature or request gitauto GitAuto label to trigger the app in a issue. good first issue Good for newcomers hacktoberfest Participation in the Hacktoberfest event help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant