Skip to content

Add MISE_ENV to cache key if set#196

Merged
jdx merged 1 commit intojdx:mainfrom
prashantv:mise-env-cache-key
May 27, 2025
Merged

Add MISE_ENV to cache key if set#196
jdx merged 1 commit intojdx:mainfrom
prashantv:mise-env-cache-key

Conversation

@prashantv
Copy link
Copy Markdown
Contributor

Fixes #169

Appends MISE_ENV to the cache key, only if it's set.
This avoids unnecessary cache misses for typical uses without MISE_ENV.

@prashantv prashantv requested a review from jdx as a code owner May 27, 2025 00:11
@prashantv
Copy link
Copy Markdown
Contributor Author

Tested here: prashantv/faket#39

Can see that the cache key includes the MISE_ENV in the CI output:

  mise cache restored from key: mise-v0-linux-x64-6e7f799d31d7e7ac8fe5b9dd6e597e5527960726423a5144eb89c8870f589bd5-oldstable

(the -oldstable is the MISE_CACHE_KEY)

@jdx jdx merged commit 367a97c into jdx:main May 27, 2025
10 checks passed
prashantv added a commit to prashantv/faket that referenced this pull request May 27, 2025
Picks up fix in jdx/mise-action#196

We no longer need to set MISE_ENV in the cache key explicitly.
prashantv added a commit to prashantv/faket that referenced this pull request May 27, 2025
Picks up fix in jdx/mise-action#196

We no longer need to set MISE_ENV in the cache key explicitly.
prashantv added a commit to prashantv/faket that referenced this pull request May 27, 2025
Picks up fix in jdx/mise-action#196

We no longer need to set MISE_ENV in the cache key explicitly.
prashantv added a commit to prashantv/faket that referenced this pull request May 27, 2025
Picks up fix in jdx/mise-action#196

We no longer need to set MISE_ENV in the cache key explicitly.
@gabrielslacerdaext-hue
Copy link
Copy Markdown

@jdx Hey. I know the issue and repo is about Github CI.

But do you have any idea about how to make the same thing in Gitlab CI? It would be awesome!

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.

Use different cache keys for different MISE_ENV values

3 participants