Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 0.4.3 — 1.5.2026.

### Fixed
- Add `freezegun` to dev dependencies so TTL/GC tests don't fail with
`ModuleNotFoundError` on fresh installs or CI.
- Restore `expires_at <= now` race guard in Redis `find_by_fingerprint` after
the `ZREVRANGEBYSCORE` pushdown — a commit can expire between the server-side
filter and the `get_commit` call.

## 0.4.2 — 1.5.2026.

### Performance
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "cashet"
version = "0.4.2"
version = "0.4.3"
description = "A Python memoization cache with Redis, async support, DAG pipelines, and an HTTP server"
readme = "README.md"
license = "MIT"
Expand Down Expand Up @@ -70,6 +70,7 @@ dev = [
"pyright>=1.1",
"httpx>=0.28.1",
"pytest-asyncio>=1.3.0",
"freezegun>=1.0",
]

[tool.ruff]
Expand Down
2 changes: 2 additions & 0 deletions src/cashet/redis_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,8 @@ async def find_by_fingerprint(self, fingerprint: str) -> Commit | None:
h_str = h.decode() if isinstance(h, bytes) else h
commit = await self.get_commit(h_str)
if commit is not None and commit.status in (TaskStatus.COMPLETED, TaskStatus.CACHED):
if commit.expires_at is not None and commit.expires_at <= datetime.now(UTC):
continue
await self._touch_commit(h_str)
return commit
return None
Expand Down
Loading