Skip to content

Conversation

jazairi
Copy link
Contributor

@jazairi jazairi commented Oct 9, 2025

Why these changes are being introduced:

The Primo API performs poorly. We should do what
we can to mitigate this.

Relevant ticket(s):

How this addresses that need:

This adds caching to Primo queries.

Side effects of this change:

None, but it's worth noting that we experience
many unique searches, and this will only help
with latency if USE UI has seen the query before.

Developer

Accessibility
  • ANDI or WAVE has been run in accordance to our guide.
  • This PR contains no changes to the view layer.
  • New issues flagged by ANDI or WAVE have been resolved.
  • New issues flagged by ANDI or WAVE have been ticketed (link in the Pull Request details above).
  • No new accessibility issues have been flagged.
New ENV
  • All new ENV is documented in README.
  • All new ENV has been added to Heroku Pipeline, Staging and Prod.
  • ENV has not changed.
Approval beyond code review
  • UXWS/stakeholder approval has been confirmed.
  • UXWS/stakeholder review will be completed retroactively.
  • UXWS/stakeholder review is not needed.
Additional context needed to review

You can toggle caching locally by running rails dev:cache. It might be useful to compare load times between your local (or this PR build) and another app without Primo caching enabled, such as staging.

Code Reviewer

Code
  • I have confirmed that the code works as intended.
  • Any CodeClimate issues have been fixed or confirmed as
    added technical debt.
Documentation
  • The commit message is clear and follows our guidelines
    (not just this pull request message).
  • The documentation has been updated or is unnecessary.
  • New dependencies are appropriate or there were no changes.
Testing
  • There are appropriate tests covering any new functionality.
  • No additional test coverage is required.

@jazairi jazairi marked this pull request as ready for review October 9, 2025 18:05
@coveralls
Copy link

coveralls commented Oct 9, 2025

Pull Request Test Coverage Report for Build 18386014633

Details

  • 24 of 24 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 98.26%

Totals Coverage Status
Change from base Build 18383325785: 0.02%
Covered Lines: 847
Relevant Lines: 862

💛 - Coveralls

@mitlib mitlib temporarily deployed to timdex-ui-pi-use-76-cac-hgkn9n October 9, 2025 18:07 Inactive
@JPrevost JPrevost self-assigned this Oct 9, 2025
@jazairi jazairi temporarily deployed to timdex-ui-pi-use-76-cac-hgkn9n October 9, 2025 18:42 Inactive
@jazairi jazairi requested a review from JPrevost October 9, 2025 18:43
Why these changes are being introduced:

The Primo API performs poorly. We should do what
we can to mitigate this.

Relevant ticket(s):

* [USE-76](https://mitlibraries.atlassian.net/browse/USE-76)

How this addresses that need:

This adds caching to Primo queries.

Side effects of this change:

None, but it's worth noting that we experience
many unique searches, and this will only help
with latency if USE UI has seen the query before.
@jazairi jazairi force-pushed the use-76-cache-primo branch from 03a01c3 to 75b451c Compare October 9, 2025 18:51
@jazairi jazairi temporarily deployed to timdex-ui-pi-use-76-cac-hgkn9n October 9, 2025 18:51 Inactive
@jazairi jazairi merged commit a54254f into main Oct 9, 2025
5 checks passed
@jazairi jazairi deleted the use-76-cache-primo branch October 9, 2025 18:52
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.

4 participants