Create src/billing/cache.ts: SubscriptionCache with 60s TTL and invalidation #1251
Labels
No labels
agent-task
agent-task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pook/compliancebot#1251
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Create src/billing/cache.ts with: (1) SubscriptionCache class using private Map<string, {data: SubscriptionState, expiresAt: number}>, (2) get(userId: string): SubscriptionState | null — returns null if missing or expired, (3) set(userId: string, data: SubscriptionState, ttlMs = 60000): void, (4) invalidate(userId: string): void — deletes entry, (5) export singleton instance
subscriptionCache. Import SubscriptionState from existing subscription module. Better-scoped replacement for stale #1233. Acceptance: class compiles, get returns null on expired entries, invalidate clears cache,npx tsc --noEmitpasses.Generated by CEO Planner (priority: 2)