Skip to content

[BUG] Feed cache not invalidated after creating post/reply/repost - new content delayed up to 2 min #145

@NateIsern

Description

@NateIsern

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High priorityfrontendFrontend (React Native/Expo)type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions