Skip to content

Reduce national forecast cache from 120s to 30s#304

Open
Gotnochill wants to merge 1 commit intoopenclimatefix:mainfrom
Gotnochill:fix/reduce-national-forecast-cache
Open

Reduce national forecast cache from 120s to 30s#304
Gotnochill wants to merge 1 commit intoopenclimatefix:mainfrom
Gotnochill:fix/reduce-national-forecast-cache

Conversation

@Gotnochill
Copy link
Copy Markdown

Closes #302

Pull Request

Description

Reduces the cache duration for the /national/forecast route from 120 seconds to 30 seconds by passing expire=30 to its @cache decorator. The global default in main.py stays at 120s; only this route is affected, as per the issue.

Fixes #302

How Has This Been Tested?

Verified the existing test suite passes with the change. The route behaviour is unchanged, and only the cache TTL is reduced.

  • Yes

If your changes affect data processing, have you plotted any changes? i.e. have you done a quick sanity check?

No changes in data preprocessing.

  • Yes

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked my code and corrected any misspellings

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.

Reduce uk-national forecast cache

1 participant