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

Improve caching in GitLab Pipeline #8058

Merged
merged 2 commits into from
Mar 4, 2025

Conversation

niclasheinz
Copy link
Collaborator

Based on #7990 I have improved the caching in GitLab pipelines. Now the .cache folder is stored in the cache.

@squidfunk
Copy link
Owner

Thanks for the PR! I'm looping in @kamilkrzyskow here, maybe he can comment if he has the time. Historically, correct caching has been a tricky topic, so we need to get this right. I currently do not have the time to properly review this, but maybe we can reach a consensus in a discussion here, so we can be sure that it improves the situation. Prior art:

@squidfunk
Copy link
Owner

Ah wait, I've mistaken this for our workflow 🤦‍♂️ Never mind, sorry for the noise. I guess it's good to merge.

@squidfunk squidfunk merged commit 3b6ae8e into squidfunk:master Mar 4, 2025
4 checks passed
@kamilkrzyskow
Copy link
Collaborator

LGTM, I asked Deepseek to provide an example of caching a .cache directory in GitLab CI, and it mentioned that there is the policy option which is set to pull-push by default. So despite the cache key being static in this case it will always download and upload the given path assuring the proper cache updates, this is what we want.

It works differently than in GitHub, where a primary cache key (exact match) doesn't warrant a upload with updated files, which lead me down the rabbit hole of using time 😅

@squidfunk
Copy link
Owner

squidfunk commented Mar 4, 2025

@kamilkrzyskow Thanks! Note that I've mistaken this for our workflow, which we need to revisit at some point, but no hurry. This is why I tagged you in the first place, which I hope was okay.

@niclasheinz niclasheinz deleted the docs-gitlab-cache branch March 4, 2025 05:50
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.

3 participants