title: How to cache an api response?
body: <p>I'm using the api <code>http://exchangeratesapi.io/</code> to get exchange rates.</p>
  <p>Their site asks:</p>
  <blockquote>
  <p>Please cache results whenever possible this will allow us to keep the service without any rate limits or api key requirements.</p>
  </blockquote>
  <p>-<a href="http://exchangeratesapi.io/" rel="nofollow noreferrer">source</a></p>
  <p>Then I found this:</p>
  <blockquote>
  <p>By default, the responses all of the requests to the exchangeratesapi.io API are cached. This allows for significant performance improvements and reduced bandwidth from your server.</p>
  </blockquote>
  <p>-<a href="https://github.com/ash-jc-allen/laravel-exchange-rates#caching" rel="nofollow noreferrer">somebody's project on github</a>, not sure if accurate</p>
  <p>I've never cached something before and these two statements confuse me. When the API's site says to &quot;please cache the results&quot;, it sounds like caching is something I can do in a <code>fetch</code> request, or somehow on the frontend. For example, some way to store the results in local storage or something. But I couldn't find anything about how to do this. I only found resources on how to force a response NOT to cache.</p>
  <p>The second quote makes it sound like caching is something the API does itself on their servers, since they set the response to cache automatically.</p>
  <p>How can I cache the results like the api site asks?</p>