Description
Deleted posts continue to appear in search results until the search cache expires naturally (which can be up to 1 hour).
Steps to Reproduce
- Create a post with unique content
- Search for that content - finds the post
- Delete the post
- Search again immediately - the deleted post still appears
- Wait for cache to expire - post disappears
Expected Behavior
Deleted posts should be immediately removed from search results.
Root Cause
The search cache (Redis) stores results by query hash, and deleting a post doesn't invalidate the relevant search cache entries.
Files to Fix
- linkup/feed/views.py - On post delete, invalidate search cache entries
- linkup/core/views.py - Add cache invalidation method for search results
- linkup/core/performance.py - Add targeted cache invalidation
Acceptance Criteria
Description
Deleted posts continue to appear in search results until the search cache expires naturally (which can be up to 1 hour).
Steps to Reproduce
Expected Behavior
Deleted posts should be immediately removed from search results.
Root Cause
The search cache (Redis) stores results by query hash, and deleting a post doesn't invalidate the relevant search cache entries.
Files to Fix
Acceptance Criteria