Skip to content

Add response caching for public creator profiles with cache invalidation #68

Description

@nanaf6203-bit

Area: Caching
Priority: P2 — Medium

Description

Public profile pages are read-heavy but rarely change. Cache them for 5 minutes to reduce Postgres load by 90%+ under normal traffic.

Acceptance Criteria

  • Add @UseInterceptors(CacheInterceptor) + @CacheTTL(300) to GET /profiles/:username and GET /profiles/:username/tipping-info
  • Use Redis cache backend (shared across instances)
  • On profile update (PUT /profiles/me, PATCH social-links, POST avatar), evict cache for that user
  • Cache hit/miss metrics added to Prometheus (cache_hits_total, cache_misses_total)
  • Document cache invalidation strategy in docs/CACHING.md
  • Test: profile read returns from cache; update invalidates; next read returns fresh data

Technical Notes

  • Use cache-manager with redis store
  • Cache key: profile:<username>:tipping-info and profile:<username>

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignP2Critical priorityenhancementNew feature or requestprofiles

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions