Skip to content

Conversation

@MikeMcQuaid
Copy link
Member

This increases the time when we will update from the API even if we're not in a command that needs auto-updates e.g. brew services.

We might make this higher still in future as this could technically be indefinite.

Fixes #21201

This increases the time when we will update from the API even if we're
not in a command that needs auto-updates e.g. `brew services`.

We might make this higher still in future as this could technically be
indefinite.
Copilot AI review requested due to automatic review settings December 16, 2025 09:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR increases the default API staleness threshold from 1 day to 7 days, reducing the frequency of API updates in non-auto-update commands like brew services. This change helps minimize unnecessary API fetches while still keeping the data reasonably fresh.

Key Changes

  • Updated DEFAULT_API_STALE_SECONDS from 86400 (1 day) to 604800 (7 days)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Dec 16, 2025
Merged via the queue into main with commit 5cf3a42 Dec 16, 2025
43 checks passed
@MikeMcQuaid MikeMcQuaid deleted the increase_api_stale_seconds branch December 16, 2025 19:42
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.

brew services performs an automatic update of JSON api data when it might not be necessary

3 participants