Skip to content

Surrogate keys in core cache API #484

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

cceckman-at-fastly
Copy link
Contributor

Support for surrogate keys and purging thereby.

Check that we consume all the options for insert-like operations
and purge, so if an SDK starts using an option Viceroy doesn't understand, it fails visibly.

  • Add tests for surrogate keys
  • Implement surrogate keys & non-soft purge, remove TODOs
  • Self-check that all insert options are handled
  • Implement soft purge

@cceckman-at-fastly cceckman-at-fastly changed the base branch from main to cceckman/stale-while-revalidate May 30, 2025 21:18
Base automatically changed from cceckman/stale-while-revalidate to main June 2, 2025 13:30
@cceckman-at-fastly cceckman-at-fastly changed the base branch from main to cceckman/visible-errors June 2, 2025 19:52
@cceckman-at-fastly cceckman-at-fastly force-pushed the cceckman/surrogate-keys branch from f25db00 to affbd1a Compare June 2, 2025 19:55
Base automatically changed from cceckman/visible-errors to main June 3, 2025 02:22
This covers all the currently-available options of `insert` calls.
Range requests still require the experimental flag.
Return an error if the caller provides (according to the mask)
a write option that is not handled by load_write_options.
@cceckman-at-fastly cceckman-at-fastly force-pushed the cceckman/surrogate-keys branch from affbd1a to d603fce Compare June 3, 2025 02:23
@cceckman-at-fastly cceckman-at-fastly requested a review from aturon June 3, 2025 02:24
@cceckman-at-fastly cceckman-at-fastly marked this pull request as ready for review June 3, 2025 02:24
And properly count items soft-purged, as turned up by the unit test.
@cceckman-at-fastly cceckman-at-fastly force-pushed the cceckman/surrogate-keys branch from d6b3e67 to 8302b92 Compare June 3, 2025 19:02
Fix a missing branch that would drop the `CacheValue` from under an
existing `Obligation`. The "revalidate" means that we can have
`value.present.is_some()` and `value.obligated` together.

Clarify the comment about when notifications are needed, and always
return `false` (because they are never needed from this block).
@cceckman-at-fastly cceckman-at-fastly requested a review from aturon June 6, 2025 18:44
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