-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fleet] Add cache-control
headers to key /epm
endpoints in Fleet API
#130921
Conversation
Pinging @elastic/fleet (Team:Fleet) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@elasticmachine merge upstream |
I'm going to swap the |
Makes sense to me. I think this would be a breaking change otherwise too, no? |
💚 Build SucceededMetrics [docs]Public APIs missing comments
Async chunks
History
To update your PR or re-run it, just comment with: cc @kpollich |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Yep you are correct. Latest commit here has this change implemented and all is green, so I'm landing this. |
…API (elastic#130921) * Add cache-control header to /categories endpoint * Add cache-control header + includeInstallStatus parameter to /packages endpoint * Add cache-control header parameter to filepath endpoint * Fix installation status type * Fix getLimitedPackages call * Fix cypress tests * Fix checks + integration test * Swap includeInstallStatus -> excludeInstallStatus query parameter Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Summary
Resolves #125794
Improve performance throughout the Integrations UI by caching key responses around integrations data:
GET /api/fleet/epm/categories
- "Browse integrations" grid side panelGET /api/fleet/epm/packages
- "Browse integrations" grid dataexcludeInstallStatus
parameter that allows us to opt-in to caching on the "Browse integrations" tab when we can afford to cache package list dataGET /api/fleet/epm/packages/<name>/<version>/<file path>
- Allows for caching requests for assets likeREADME.md
files, etcEach of these endpoints has a
cache-control
header w/ valuemax-age: 600
added, so they'll be cached for 10 minutes. Further improvements could be made in the future around more granular caching values for each endpoint, or investigating the usage of thestale-while-revalidate
cache directive to avoid heavy un-cached requests once the cache is stale.I've included some network tab screenshots and notes around each of these requests below:
View screenshots