Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

kayw-geek
Copy link

Add Cache-Control headers for --no-cache option to bypass CDN caching

When users specify --no-cache, Composer now sends Cache-Control: no-cache headers with repository metadata requests, directly bypassing all cache layers to fetch fresh data from origin servers.

This ensures that both local and CDN caches are completely skipped, providing a reliable solution for package version resolution issues caused by outdated cached data.

Specifically addresses scenarios where CDN synchronization delays or stale cache entries prevent immediate access to newly published package versions, allowing developers to force-fetch the latest repository state without any cache interference.

Fix #12339

@kayw-geek kayw-geek closed this Sep 4, 2025
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.

Composer doesn't detect the latest package version 1 week after the release
1 participant