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

Another way to handle multiple Inputs cache policies #16786

Merged
merged 4 commits into from
Jan 21, 2025

Conversation

desertaxle
Copy link
Member

@desertaxle desertaxle commented Jan 20, 2025

These changes handle multiple Inputs cache policies by combining them in a __post_init__ method on CompoundCachePolicy and avoiding nesting compound policies when adding or subtracting.

Note this update will change how cache keys are computed in some cases.

Copy link

codspeed-hq bot commented Jan 20, 2025

CodSpeed Performance Report

Merging #16786 will not alter performance

Comparing redundant-inputs-another-way (dccd63f) with redundant-inputs (7fdbd4b)

Summary

✅ 2 untouched benchmarks

Copy link
Collaborator

@zzstoatzz zzstoatzz left a comment

Choose a reason for hiding this comment

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

aha nice - much cleaner

src/prefect/cache_policies.py Outdated Show resolved Hide resolved
@zzstoatzz zzstoatzz marked this pull request as ready for review January 21, 2025 01:40
@zzstoatzz zzstoatzz requested a review from cicdw as a code owner January 21, 2025 01:40
@zzstoatzz zzstoatzz merged commit 6a8cfc6 into redundant-inputs Jan 21, 2025
41 of 42 checks passed
@zzstoatzz zzstoatzz deleted the redundant-inputs-another-way branch January 21, 2025 01:40
zzstoatzz added a commit that referenced this pull request Jan 21, 2025
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