Skip to content

Harden Texture Cache Invalidation #787

Description

@SorraTheOrc

Summary

Define deterministic cache invalidation and regeneration for resize and DPR changes.

Player and user experience impact

  • Player experience: Card visuals remain visible and correctly occluded by overlays using Phaser layer/depth semantics.
  • Developer experience: One consistent rendering path with reduced DOM-specific maintenance overhead.

Acceptance Criteria

  • Resize and DPR changes trigger expected texture refresh behavior.
  • Steady-state rendering avoids unnecessary texture regeneration.
  • Cache key/invalidation policy is documented and test covered.

Minimal Implementation (end-to-end slice)

  • Define invalidation triggers (resize, DPR change, texture version key).
  • Add lightweight regeneration counters/logs in test mode for assertions.
  • Add browser smoke coverage for resize and post-resize visual correctness.
  • Document cache policy and regeneration triggers.

Dependencies

  • Unify Shared SVG Texture Pipeline

Deliverables

  • Cache policy docs
  • Targeted tests
  • Light observability hooks

References

  • Parent: Phaser-native rendering for DOM SVG card visuals (replace svgDom) (CG-0MP8YFNX4007N9ZU)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions