Extend interal call cache window for safty#2318
Merged
cb-github-robot merged 1 commit intocloud-barista:mainfrom Feb 19, 2026
Merged
Extend interal call cache window for safty#2318cb-github-robot merged 1 commit intocloud-barista:mainfrom
cb-github-robot merged 1 commit intocloud-barista:mainfrom
Conversation
Signed-off-by: Seokho Son <shsongist@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new cache duration constant VeryLongDuration (300 seconds) and applies it to internal API calls for lookup operations involving relatively static cloud provider metadata (VM specifications, images, pricing information, and region/zone availability). The purpose is to enhance API call stability, particularly for Azure API calls, by extending the cache window from 5 seconds (MediumDuration) to 300 seconds for these lookup operations.
Changes:
- Added
VeryLongDurationconstant (300 seconds) to client package for very long-term caching - Updated cache duration for spec lookup operations (LookupSpecList, LookupSpec, LookupPriceList, GetAvailableRegionZonesForSpec) from MediumDuration to VeryLongDuration
- Updated cache duration for image lookup operations (lookupRegularImageOnly, LookupMyImage) from MediumDuration to VeryLongDuration
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/core/common/client/client.go | Defines new VeryLongDuration constant (300 seconds) for very long-term caching |
| src/core/resource/spec.go | Updates cache duration for spec and price lookup operations to use VeryLongDuration |
| src/core/resource/image.go | Updates cache duration for regular image lookup to use VeryLongDuration |
| src/core/resource/customimage.go | Updates cache duration for custom image lookup to use VeryLongDuration |
Comments suppressed due to low confidence (1)
src/core/common/client/client.go:72
- The comment contains a spelling error: "safty" should be "safety". Additionally, the comment should be corrected to "very long-term cache" for consistency with other duration comments.
// VeryLongDuration is a duration for very long-term cache
VeryLongDuration = 300 * time.Second
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
Author
|
/approve |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR invites
// VeryLongDuration is a duration for very long-term cache
and apply it to some internal API calls to enhance API call stability (especially for Azure API call)