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

Remove caching for some find images APIs #241

Conversation

qixiang
Copy link
Contributor

@qixiang qixiang commented Sep 13, 2023

Caching should not be enabled for some find images APIs, because the result can change at any time, if we have caching for such APIs, images just be released may not be returned by these APIs which can cause wrong result of images to be rebuilt.

These APIs are from pyxis_gql module:

1. find_images_by_installed_rpms
2. find_images_by_names
3. find_images_by_name_version
4. find_images_by_repository

Caching for other find images APIs is fine:

1. find_images_by_nvr
2. find_images_by_nvrs

Caching should not be enabled for some find images APIs, because the
result can change at any time, if we have caching for such APIs, images
just be released may not be returned by these APIs which can cause
wrong result of images to be rebuilt.

These APIs are from `pyxis_gql` module:

    1. find_images_by_installed_rpms
    2. find_images_by_names
    3. find_images_by_name_version
    4. find_images_by_repository

Caching for other find images APIs is fine:

    1. find_images_by_nvr
    2. find_images_by_nvrs
@qixiang qixiang requested a review from FernandesMF September 13, 2023 14:44
Copy link
Contributor

@FernandesMF FernandesMF left a comment

Choose a reason for hiding this comment

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

Makes all the sense, and looks good to me!

@qixiang qixiang merged commit e2f31bd into redhat-exd-rebuilds:main Sep 13, 2023
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.

2 participants