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

Cache Policy Upgrades #13821

Merged
merged 6 commits into from
Jun 6, 2024
Merged

Cache Policy Upgrades #13821

merged 6 commits into from
Jun 6, 2024

Conversation

cicdw
Copy link
Member

@cicdw cicdw commented Jun 5, 2024

This PR updates cache policies in the following ways:

  • updates the signature on compute_key to be closer to the original cache_key_fn signature
  • auto-converts cache_key_fn's to CacheKeyFnPolicy's for backwards compatibility
  • adds an overwrite flag on transactions that can be used to ignore existing records; the engine currently matches this to the original refresh_cache functionality

NOTE: cache expirations are not currently wired up; that will require some extensions to cache policies that will need to be handled separately

cc: @EmilRex (I won't keep doing this I promise haha - this just dovetails nicely with our conversations this week so wanted you to know when these milestones are complete)

@cicdw cicdw requested a review from a team as a code owner June 5, 2024 21:18
@jlowin
Copy link
Member

jlowin commented Jun 5, 2024

Did you know if you at-@EmilRex three times in three PRs he has to grant you three wishes? I don't make the rules

Copy link
Collaborator

@chrisguidry chrisguidry left a comment

Choose a reason for hiding this comment

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

I love it when a plan comes together, so nice to unify the old cache functions under the new scheme

@EmilRex
Copy link
Contributor

EmilRex commented Jun 6, 2024

Did you know if you at-@EmilRex three times in three PRs he has to grant you three wishes? I don't make the rules

It's true! I'm always down for a challenge.

@cicdw cicdw merged commit e87cba6 into main Jun 6, 2024
27 checks passed
@cicdw cicdw deleted the policy-upgrades branch June 6, 2024 15:38
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.

None yet

4 participants