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 result of findGaps() on gapless streams #1515

Merged
merged 1 commit into from
Jan 18, 2023
Merged

Conversation

jacobtylerwalls
Copy link
Member

This approach uses False to distinguish "no gaps" from "force a cache miss" (None), although this has to then be converted back to None for cache hits.

An alternative would be to rewrite the cache (there aren't that many keys) to just delete keys when intending to force cache misses.

Another alternative would be to break BC and have findGaps() return something else, like an empty stream that would still test False.

Closes #1514

@coveralls
Copy link

Coverage Status

Coverage: 93.053% (+0.001%) from 93.052% when pulling 690dd2c on cache-find-gaps into 2e0ce4e on master.

@mscuthbert
Copy link
Member

thanks -- super great.

@mscuthbert mscuthbert merged commit aa7b068 into master Jan 18, 2023
@mscuthbert mscuthbert deleted the cache-find-gaps branch January 18, 2023 02:12
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.

findGaps() only caches result if there is a gap
3 participants