Release 0.4.2: tag-index invalidation perf, Redis TTL pushdown, invalidate CLI#7
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
delete_by_tagsin SQLite batches all matching rows into a single DELETE with one orphan-detection pass — previously O(n) row-by-row_delete_commit_bodycalls with per-row orphan queries.delete_by_tagsin Redis now uses tag-set indexes (cashet:tag:{key},cashet:tag:{key}:{value}) with SINTER — previously a fullzrevrange(all)scan fetching every commit.find_by_fingerprintin Redis pushes TTL filtering server-side viaZREVRANGEBYSCOREusingexpires_attimestamp as the sorted-set score — previously Python-iterated all candidates checkingexpires_atclient-side.cashet invalidate -t key=value/-t keyCLI command.time.sleepwithfreezegunin 3 TTL/GC tests for deterministic execution.delete_by_tagscoverage (exact match, bare key, multi-condition) and CLIinvalidatetests.Test plan
uv run ruff check src/ tests/ && uv run pyright src/uv run pytest tests/ -v(339 passed)pip install .,cashet invalidate -t key=valueworks