Skip to content

bug(cache): clear JSON cache artifacts on reset #147

@aviralgarg05

Description

@aviralgarg05

Summary

Fix semantic cache clear behavior to remove JSON cache artifacts as well as legacy pickle files.

Why

Cache save/load favors JSON, but clear logic currently targets only one path pattern.

Tasks

  • Update clear flow in nexum_ai/optimizer.py to remove active cache format files consistently
  • Handle .json, .json.backup, and legacy .pkl safely
  • Add/adjust tests in nexum_ai/tests/

Acceptance Criteria

  • Clearing cache removes persisted cache artifacts
  • No exceptions when files are already absent
  • Tests validate file cleanup behavior

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions