Skip to content

Bug: Catalog sync leaves stale entitlement cache entries active #229

Description

@Abdulmumin1

Catalog sync updates/deletes features, plan features, credit mappings, and plan membership without invalidating entitlement caches. Affected area: apps/api/src/routes/api/sync.ts. Impact: cached entitlement decisions can continue granting removed features or old limits until cache expiry after SDK sync changes. Expected: entitlement cache reflects catalog mutations promptly. Fix: invalidate affected feature, planFeatures, subscription, and customer entitlement cache keys when sync changes catalog data, or introduce an organization catalog version in cache keys and bump it on sync. Add tests proving removed/lowered features are not granted after sync.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions