Skip to content
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

feat(xen-api): cache support for call & callAsync #7853

Merged
merged 3 commits into from
Jul 24, 2024
Merged

Conversation

julien-f
Copy link
Member

@julien-f julien-f commented Jul 23, 2024

Description

Allows to easily cache result of XAPI calls and will be used in various situations like #7751

Checklist

  • Commit
    • Title follows commit conventions
    • Reference the relevant issue (Fixes #007, See xoa-support#42, See https://...)
    • If bug fix, add Introduced by
  • Changelog
    • If visible by XOA users, add changelog entry
    • Update "Packages to release" in CHANGELOG.unreleased.md
  • PR
    • If UI changes, add screenshots
    • If not finished or not tested, open as Draft

@julien-f julien-f requested a review from MathieuRA July 23, 2024 14:44
call: [
cachable,
args => {
if (typeof args[0] !== 'string') {
Copy link
Member Author

Choose a reason for hiding this comment

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

Nope, it's not always a Map, it's a object that respect the Map interface, which opens the use with other libs like @isaacs/ttlcache or lru-cache.

@fbeauchamp fbeauchamp merged commit 79690fc into master Jul 24, 2024
1 check passed
@fbeauchamp fbeauchamp deleted the xapi-call-cache branch July 24, 2024 13:56
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.

3 participants