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

Reduce Reliance on Global Cache #3198

Open
yhakbar opened this issue Jun 11, 2024 · 1 comment
Open

Reduce Reliance on Global Cache #3198

yhakbar opened this issue Jun 11, 2024 · 1 comment
Assignees

Comments

@yhakbar
Copy link
Collaborator

yhakbar commented Jun 11, 2024

We rely on global variables for shared cache state, which is an anti-pattern we should refactor out of the codebase.

This can cause issues with integration testing, and can increase the memory footprint of Terragrunt.

Develop a new mechanism for explicitly passing around that cache through a cache manager so that we can be more thoughtful with how we're caching content throughout an invocation of Terragrunt. Refactor caching throughout the codebase to leverage it.

@yhakbar
Copy link
Collaborator Author

yhakbar commented Jun 11, 2024

An interesting observation made was that we generally are looking for caching to support memoization of our function calls.

Leveraging a OnceFunc with something to old the functions for re-use might provide a good pattern for a large scale refactor.

@levkohimins levkohimins self-assigned this Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants