Skip to content

Fix stale serializer cache IDs after deletion - #9390

Open
longligooo wants to merge 1 commit into
invoke-ai:mainfrom
longligooo:fix/9370-forward-cache-deletion
Open

Fix stale serializer cache IDs after deletion#9390
longligooo wants to merge 1 commit into
invoke-ai:mainfrom
longligooo:fix/9370-forward-cache-deletion

Conversation

@longligooo

Copy link
Copy Markdown

Summary

  • Remove deleted object identifiers from the forward cache's eviction queue.
  • Prevent a later cache insertion from attempting to evict an identifier that no longer exists.
  • Add regression coverage for deleting a cached object and filling the freed cache slot.

Related Issues / Discussions

Closes #9370

QA Instructions

Run the focused regression test:

pytest -q tests/test_object_serializer_disk.py::test_obj_serializer_fwd_cache_removes_deleted_ids_from_eviction_queue

Run the configured lint check on the changed files:

ruff check invokeai/app/services/object_serializer/object_serializer_forward_cache.py tests/test_object_serializer_disk.py

Merge Plan

No special merge steps are required.

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • Changes to a redux slice have a corresponding migration (not applicable)
  • Documentation added / updated (if applicable) (not applicable)
  • Updated What's New copy (if doing a release after this PR) (not applicable)

@github-actions github-actions Bot added python PRs that change python files services PRs that change app services python-tests PRs that change python tests labels Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python PRs that change python files python-tests PRs that change python tests services PRs that change app services

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: ObjectSerializerForwardCache.delete() leaves a stale cache ID that causes a later save() to raise KeyError

2 participants