Skip to content

Conversation

@ghinks
Copy link
Owner

@ghinks ghinks commented Oct 23, 2025

Summary

  • Add three new command-line options for cache management (--cache-stats, --clear-expired-cache, --clear-cache)
  • Remove two unused functions from sqlite_cache.py (delete_pr_review() and delete_pr_metadata())
  • Update tests to accommodate new CLI fields

Cache Management Options

--cache-stats

Displays detailed cache statistics including:

  • Database path and size
  • Total, valid, and expired entries
  • Per-table breakdown (pr_reviews and pr_metadata)

--clear-expired-cache

Removes only expired cache entries while keeping valid ones intact

--clear-cache

Clears all cached data (both expired and valid entries)

Code Cleanup

Removed unused functions:

  • delete_pr_review() - No callers in codebase
  • delete_pr_metadata() - No callers in codebase

These functions provided fine-grained deletion but were redundant as cache entries already have TTL-based expiration and the new CLI options provide bulk operations.

Test Plan

  • All ruff linting checks pass
  • All mypy type checks pass
  • All 65 unit tests pass
  • Manual testing of all three cache options verified
  • Integration test against expressjs organization successful

🤖 Generated with Claude Code

Add three new command-line options for cache management:
- --cache-stats: Display detailed cache statistics
- --clear-expired-cache: Remove only expired cache entries
- --clear-cache: Clear all cached data

Remove unused functions from sqlite_cache.py:
- delete_pr_review(): No callers in codebase
- delete_pr_metadata(): No callers in codebase

This reduces code maintenance burden while providing users with
essential cache management tools via the CLI.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@ghinks ghinks merged commit 33ba032 into main Oct 23, 2025
9 checks passed
@ghinks ghinks deleted the feat/cache-clearing branch October 23, 2025 19:52
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