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: Split cache name and label #2161

Merged
merged 1 commit into from
Oct 18, 2023
Merged

feat: Split cache name and label #2161

merged 1 commit into from
Oct 18, 2023

Conversation

chubei
Copy link
Contributor

@chubei chubei commented Oct 17, 2023

Every cache is a file under the cache_dir. Previously we're using the metrics labels as the cache file name. This works when there's a unique cache for each endpoint.

However, as we're going to introduce blue green cache again, this naming convention can not be used anymore.
Here we add a name parameter to RwCacheManager::create_cache, to allow the user to use a different name from the labels. The labels only affects the metrics labels now. And we can open the same cache while attaching different labels.

The plan is to use the labels as cache alias to enable switching between blue green cache.

@chubei chubei added this pull request to the merge queue Oct 18, 2023
Merged via the queue into getdozer:main with commit 6c364e5 Oct 18, 2023
6 checks passed
@chubei chubei deleted the feat/cache_name branch October 18, 2023 07:05
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.

2 participants