Description
After creating a new post, reply, or repost, the home feed does not immediately show the new content. Users have to wait up to 2 minutes (the cache TTL) or manually refresh for their content to appear.
Root Cause
feedService.ts has a client-side feedCache with a 2-minute TTL, but the createPost(), createReply(), createRepost(), and createThread() methods do not invalidate this cache after writing.
Fix Applied
Added feedCache.clear() after successful post/reply/repost/thread creation in feedService.ts to ensure the feed refreshes immediately with the new content.
Files Modified
packages/frontend/services/feedService.ts — Added feedCache.clear() in createPost(), createReply(), createRepost(), and createThread()
Impact
- Severity: High (users think their post didn't publish)
- User experience: Post appears to succeed (toast + redirect) but feed shows stale data
Description
After creating a new post, reply, or repost, the home feed does not immediately show the new content. Users have to wait up to 2 minutes (the cache TTL) or manually refresh for their content to appear.
Root Cause
feedService.tshas a client-sidefeedCachewith a 2-minute TTL, but thecreatePost(),createReply(),createRepost(), andcreateThread()methods do not invalidate this cache after writing.Fix Applied
Added
feedCache.clear()after successful post/reply/repost/thread creation infeedService.tsto ensure the feed refreshes immediately with the new content.Files Modified
packages/frontend/services/feedService.ts— AddedfeedCache.clear()increatePost(),createReply(),createRepost(), andcreateThread()Impact