Files
Sahaj Jain 6bc66ba071 perf(community): denormalize like_count, cache reads with unstable_cache
- Add like_count column to community_theme table with backfill migration
- Update toggleLikeTheme to atomically increment/decrement instead of COUNT(*)
- Remove expensive GROUP BY subquery from getCommunityThemes and getCommunityDataForTheme
- Wrap read queries with unstable_cache (60s themes, 300s tag counts)
- Add revalidateTag calls to all write operations for cache invalidation
- Increase React Query staleTime (themes 2m→5m, tags 5m→15m, published 5m→10m)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 00:44:42 +05:30
..