title: How to make api request cache with php?
body: <p>There is a code api url and it is output json format. I need cache my json result or different solution. Because my page when visiting new user it calling api again and page opening speeds consists of problems. How can i make it?</p>
  
  <p>My Code:</p>
  
  <pre><code>&lt;?php
  $jsonurl     = 'http://api.site.com/deal/browse.html?apiKey=VN43U6&amp;p=2';
  $json        = file_get_contents($jsonurl, 0, null, null);
  $json_output = json_decode($json);
  foreach ($json_output-&gt;deals as $objects) {
      $title = $objects-&gt;title;
      echo '&lt;h5 class="coupon-title"&gt;' . $title . '&lt;/h5&gt;';
  }
  ?&gt;
  </code></pre>