Skip to content

[bid-manager-api] feat: Add query cache and report reuse - #215

Merged
AndreyMarkinPPC merged 1 commit into
google:mainfrom
Vasist10:main
Dec 3, 2025
Merged

[bid-manager-api] feat: Add query cache and report reuse#215
AndreyMarkinPPC merged 1 commit into
google:mainfrom
Vasist10:main

Conversation

@Vasist10

@Vasist10 Vasist10 commented Dec 2, 2025

Copy link
Copy Markdown
Contributor

This PR implements caching logic for the Bid Manager API to avoid generating duplicate reports when the same query is issued multiple times. The feature stores and reuses query_id and report_id associated with a query_hash, reducing API calls and improving performance.

issue: #208

Added unit tests covering both pathways:

  • test_get_response_reuses_cached_report()
  • test_get_response_creates_and_caches_report()

@AndreyMarkinPPC

AndreyMarkinPPC commented Dec 3, 2025

Copy link
Copy Markdown
Member

@Vasist10, thank you so much for the contribution and working on the issue #208!
Everything's looks good to me.
Do you want me to bump the version on pypi for easier installation or having code on github is sufficient?

@AndreyMarkinPPC AndreyMarkinPPC added the enhancement New feature or request label Dec 3, 2025
@AndreyMarkinPPC
AndreyMarkinPPC merged commit 4d1c353 into google:main Dec 3, 2025
2 checks passed
@AndreyMarkinPPC AndreyMarkinPPC linked an issue Dec 3, 2025 that may be closed by this pull request
@Vasist10

Vasist10 commented Dec 4, 2025

Copy link
Copy Markdown
Contributor Author

@Vasist10, thank you so much for the contribution and working on the issue #208! Everything's looks good to me. Do you want me to bump the version on pypi for easier installation or having code on github is sufficient?

I just noticed it has already been deployed to PyPI.
Thank you for bumping the version! Really happy to see the caching improvement included in the release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bid-manager-api] Implement report_id / query_id check

2 participants