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

[Malleability] Update herocache to use generics and implement BackData #7074

Open
Tracked by #6646
UlyanaAndrukhiv opened this issue Feb 20, 2025 · 0 comments
Open
Tracked by #6646

Comments

@UlyanaAndrukhiv
Copy link
Contributor

UlyanaAndrukhiv commented Feb 20, 2025

Related issues

Main approach for this refactoring - #6703

This issue depends on:

Context

The current Cache implementation uses specific types such as flow.Identifier for keys and flow.Entity for values, which restricts flexibility and reusability across different data structures. The PoolEntity structure also tightly couples entity (flow.Entity) and the identity (Identity associated with this entity) fields to these concrete types, limiting the overall flexibility. The goal is to refactor the Cache and PoolEntity to use generics, enabling them to handle any data type for both the key and the value.

Additionally, herocache is the implementation of BackData.The task has a dependency on #7070, which should be completed before proceeding with certain parts of the implementation.

Proposed Solution

  • Refactor the Cache and PoolEntity to use generics for both theflow.Identifier and flow.Entity types.
    • The PoolEntity will be updated to use generic types instead of flow.Identifier for the key and flow.Entity for the value.
  • Ensure the BackData functionality in herocache is implemented.
  • Ensure the Pool integrates seamlessly with the new generic Cache and PoolEntity design.

Definition of Done

  • The Cache and PoolEntity are refactored to use generics.
  • The BackData functionality is implemented within herocache.
  • The Pool is updated to work with the new generic Cache and PoolEntity design.
  • All relevant code that interacts with the Cache and PoolEntity is updated accordingly.
  • Tests are updated or added to ensure the new generic design works as expected.
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

No branches or pull requests

1 participant