Skip to content

Refactor: Introduce common caching utilities. #5098

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sjrd
Copy link
Member

@sjrd sjrd commented Jan 2, 2025

Previously, we had several reimplementations of the same basic caching mechanisms. In particular, cleanAfterRun()-based removal of caches not used in a given run.

In this commit, we introduce common caching utilities. The provide common implementations of the various idioms that we use. This simplifies all the use sites, which can now focus on their core logic, instead of mixing it with caching mechanisms.

The abstraction is not zero-cost everywhere. It may introduce some constant overhead.

@sjrd sjrd requested a review from gzm0 January 2, 2025 12:12
@sjrd sjrd force-pushed the caching-utilities branch from 3f76772 to 84f3866 Compare January 9, 2025 09:15
@sjrd sjrd changed the title Introduce common caching utilities. Refactor: Introduce common caching utilities. Feb 6, 2025
@sjrd sjrd force-pushed the caching-utilities branch from 84f3866 to 784a85d Compare February 6, 2025 16:04
Previously, we had several reimplementations of the same basic
caching mechanisms. In particular, `cleanAfterRun()`-based removal
of caches not used in a given run.

In this commit, we introduce common caching utilities. The provide
common implementations of the various idioms that we use. This
simplifies all the use sites, which can now focus on their core
logic, instead of mixing it with caching mechanisms.

The abstraction is not zero-cost everywhere. It may introduce some
constant overhead.
@sjrd sjrd force-pushed the caching-utilities branch from 784a85d to 61122d8 Compare April 22, 2025 08:14
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.

1 participant