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

codeforamerica / ohana-api / 547 / 1
99%
master: 99%

Build:
DEFAULT BRANCH: master
Ran 19 Aug 2014 07:20PM UTC
Files 63
Run time 27s
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

19 Aug 2014 07:17PM UTC coverage: 99.454% (+0.001%) from 99.453%
2.1.1

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

Source Files on job 547.1 (2.1.1)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 547
  • Travis Job 547.1
  • 236199a1 on github
  • Prev Job for 2.1.1 on master (#546.1)
  • Next Job for 2.1.1 on master (#548.1)
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