• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

codeforamerica / ohana-api / 547
99%

Build:
DEFAULT BRANCH: master
Ran 19 Aug 2014 07:20PM UTC
Jobs 1
Files 63
Run time 28s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
547

push

travis-ci

monfresh
Set Cache-Control to max-age=300, public

To improve the performance of Ohana Web Search, and to reduce the load on the API, we tell Ohana Web Search to cache API responses for a specified amount of time.

The 2 API calls that Ohana Web Search makes correspond to the `index` action in `search_controller` and the `show` action in `locations_controller`. By default, Rails sets Cache-Control to `max-age=0, private, must-revalidate`. By adding the `expires_in` line to the end of the controller actions, we set Cache-Control to `public`, and set `max-age` to the number of minutes specified in the `EXPIRES_IN` env var.

In Ohana Web Search, this is handled by the Ohanakapa Ruby wrapper in conjuction with the `faraday-http-cache` gem, which determines whether or not to repeat an API request based on the Cache-Control header in the API response.

911 of 916 relevant lines covered (99.45%)

54.57 hits per line

Jobs
ID Job ID Ran Files Coverage
1 547.1 (2.1.1) 19 Aug 2014 07:20PM UTC 0
99.45
Travis Job 547.1
Source Files on build 547
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #547
  • 236199a1 on github
  • Prev Build on master (#546)
  • Next Build on master (#548)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc