Skip to content

feat(cache): Use repository cache instead of memory cache for GitHub presets#35999

Merged
rarkins merged 1 commit intorenovatebot:mainfrom
zharinov:feat/github-presets-repo-cache
May 19, 2025
Merged

feat(cache): Use repository cache instead of memory cache for GitHub presets#35999
rarkins merged 1 commit intorenovatebot:mainfrom
zharinov:feat/github-presets-repo-cache

Conversation

@zharinov
Copy link
Copy Markdown
Collaborator

@zharinov zharinov commented May 17, 2025

Changes

This PR won't reduce HTTP requests, but such requests will be made with cache-related headers (etag/last-modified), which helps with rate limits.

We don't want to cache it in the package cache because it's hard to differentiate between private/public repos. Hence we use repo cache.

Unlike package cache, repository caching doesn't implement soft/hard caching separation.
We probably don't want it anyways, as we always want to get fresh files without 15 minutes delay.

Context

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@zharinov zharinov requested review from rarkins and viceice May 17, 2025 13:57
@zharinov
Copy link
Copy Markdown
Collaborator Author

zharinov commented May 17, 2025

inheritConfig relies on platform.getRawFile() which already uses repo cache, but only for the same org. I don't remember exact reasoning behind "same org only" caching.

Maybe it's okay to remove this restriction as we use repository cache (not the shared package cache). But I'm not sure.

@rarkins rarkins added this pull request to the merge queue May 19, 2025
Merged via the queue into renovatebot:main with commit 74a3fcb May 19, 2025
40 checks passed
@rarkins rarkins deleted the feat/github-presets-repo-cache branch May 19, 2025 06:19
@renovate-release
Copy link
Copy Markdown

🎉 This PR is included in version 40.15.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cache config preset lookups in repository cache

4 participants