E530 Optimize cache fetching for hackathon API index by northeastprince · Pull Request #825 · hackclub/hackathons-backend · GitHub
[go: up one dir, main page]

Skip to content

Optimize cache fetching for hackathon API index#825

Merged
northeastprince merged 2 commits intomainfrom
api-cache-multi-fetch
Mar 13, 2026
Merged

Optimize cache fetching for hackathon API index#825
northeastprince merged 2 commits intomainfrom
api-cache-multi-fetch

Conversation

@northeastprince
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings March 13, 2026 14:30
Copy link
Contributor
Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR optimizes the hackathons API index response by shifting JSON fragment caching to the collection rendering layer, reducing repeated work when serializing hackathon records.

Changes:

  • Enable per-record caching when rendering the hackathons index JSON array.
  • Remove the explicit json.cache! block from the hackathon partial (caching now handled by the caller).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
app/views/api/hackathons/index.json.v1.jbuilder Enables cached rendering for each hackathon in the paginated index array.
app/views/api/hackathons/_hackathon.json.v1.jbuilder Removes internal fragment caching wrapper; leaves pure serialization via shape_for and extracted fields.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@northeastprince northeastprince merged commit 5a0d9ff into main Mar 13, 2026
11 of 12 checks passed
@northeastprince northeastprince deleted the api-cache-multi-fetch branch March 13, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0