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

feat(ARCO-283): remove freecache, combine methods with cache implementation #643

Merged
merged 26 commits into from
Dec 4, 2024

Conversation

pawellewandowski98
Copy link
Collaborator

Description of Changes

Provide a brief description of the changes you've made.

Linked Issues / Tickets

Reference any related issues or tickets, e.g. "Closes #123".

Testing Procedure

Describe the tests you've added or any testing steps you've taken.

  • I have added new unit tests
  • All tests pass locally
  • I have tested manually in my local environment

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have updated CHANGELOG.md with my changes

@pawellewandowski98 pawellewandowski98 self-assigned this Nov 13, 2024
@arkadiuszos4chain
Copy link
Collaborator

I would introduce a few changes (since we already virtualize the cache engine):

  1. implement a simple InMemoryCacheStore
  2. rename config.InternalCache to config.InMemory
  3. use InMemoryCacheStore as the default in the processor. This will simplify the code by reducing the number of if statements.

Bonus question: are you sure it's good to store the entire map in the cache instead of querying and saving individual records?

internal/metamorph/processor_helpers.go Outdated Show resolved Hide resolved
internal/cache/redis.go Outdated Show resolved Hide resolved
internal/cache/in_memory.go Outdated Show resolved Hide resolved
internal/cache/redis.go Outdated Show resolved Hide resolved
@arkadiuszos4chain arkadiuszos4chain self-requested a review November 19, 2024 14:13
internal/cache/in_memory.go Outdated Show resolved Hide resolved
internal/cache/in_memory.go Outdated Show resolved Hide resolved
@pawellewandowski98 pawellewandowski98 force-pushed the refactor/cache-implementation branch from 9c54bdc to 04d066e Compare November 20, 2024 09:57
@arkadiuszos4chain arkadiuszos4chain self-requested a review November 20, 2024 11:14
internal/metamorph/processor_helpers.go Outdated Show resolved Hide resolved
internal/cache/cache.go Outdated Show resolved Hide resolved
internal/metamorph/processor_helpers.go Outdated Show resolved Hide resolved
internal/metamorph/processor_helpers.go Show resolved Hide resolved
@pawellewandowski98 pawellewandowski98 force-pushed the refactor/cache-implementation branch 3 times, most recently from b64abcd to 1a8ddd9 Compare November 26, 2024 08:06
@pawellewandowski98 pawellewandowski98 force-pushed the refactor/cache-implementation branch from 1a8ddd9 to 4fcc557 Compare November 27, 2024 08:12
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
56.7% Coverage on New Code (required ≥ 80%)
3.9% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@arkadiuszos4chain arkadiuszos4chain self-requested a review December 4, 2024 09:13
@pawellewandowski98 pawellewandowski98 merged commit 568adb2 into main Dec 4, 2024
6 of 7 checks passed
@pawellewandowski98 pawellewandowski98 deleted the refactor/cache-implementation branch December 4, 2024 09:15
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.

4 participants