Skip to content

AI/Infra: Add memory caching layer for commonly evaluated positions #766

Description

@chinweobtagaz

Description

Many users evaluate the exact same positions (e.g., standard opening deviations or popular puzzles). Re-evaluating them is a waste of resources.

What Needs to be Done

  • Implement a Redis cache layer for the engine worker orchestrator.
  • Hash the FEN and requested depth as the cache key.
  • Store the best move, evaluation, and principal variation (PV).

Acceptance Criteria

  • Cache hits return instantly without querying the engine pool.
  • Cache automatically evicts old/unused positions (LRU policy).
  • Handles millions of keys efficiently with minimal memory footprint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions