Problem
Sanity queries are not cached, causing:
- Repeated expensive CMS queries
- Slow response times
- High API usage costs
- Poor performance for repeated requests
Impact
- Slow page load times
- High API costs
- Poor user experience
- Unnecessary database queries
Solution
Implement caching for Sanity queries:
- Cache frequently accessed content
- Add cache invalidation strategies
- Implement query result caching
- Add cache monitoring
Files to modify
src/sanity/queries/index.ts
- Sanity client configuration
Acceptance Criteria