Skip to content

Implement automatic cleanup of stale cache entries#290

Merged
shaypal5 merged 5 commits intomasterfrom
codex/implement-feature-from-issue-16
Jul 15, 2025
Merged

Implement automatic cleanup of stale cache entries#290
shaypal5 merged 5 commits intomasterfrom
codex/implement-feature-from-issue-16

Conversation

@shaypal5
Copy link
Copy Markdown
Member

@shaypal5 shaypal5 commented Jul 15, 2025

Summary

  • Addresses issue TypeError: cannot pickle '_thread.lock' object #26
  • add cleanup_stale and cleanup_interval parameters
  • implement stale-entry deletion in each backend
  • periodically run cleanup in cachier decorator
  • document new feature and defaults
  • add tests for pickle backend cleanup

Testing

  • ruff check .
  • mypy --install-types --non-interactive src/cachier
  • pytest tests/test_cleanup.py -q -m pickle

https://chatgpt.com/codex/tasks/task_e_68761d7d53e48323ba091be1ae2af698

@shaypal5 shaypal5 requested a review from Borda July 15, 2025 12:32
Copy link
Copy Markdown
Contributor

@Borda Borda left a comment

Choose a reason for hiding this comment

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

wondering if all the # type: ignore[arg-type] are required instead of addressing it... Could you share the trace?

@shaypal5
Copy link
Copy Markdown
Member Author

wondering if all the # type: ignore[arg-type] are required instead of addressing it... Could you share the trace?

Me too. It's the first time I used Codex. Maybe it's a pet peeve of this model specifically. I think it's running mypy for type check; it might be coming from there.

@shaypal5 shaypal5 merged commit d61b60e into master Jul 15, 2025
42 checks passed
@shaypal5 shaypal5 deleted the codex/implement-feature-from-issue-16 branch July 15, 2025 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants