title: Execute a method less times possible - PHP
body: <p>I have a site in multiple languages. I have a method that returns me the today currencies in a array. I display that currencies in a table then.</p>
  
  <pre><code>// --- en/index.php
  &lt;?php
  include_once "../exchangeRates.php";
  $currencies = ReadExchangeRates();
  
  // --- fr/index.php
  &lt;?php
  include_once "../exchangeRates.php";
  $currencies = ReadExchangeRates();
  
  ...
  // somewhere in the page
  &lt;td&gt;&lt;?php echo $currencies["eur"]["today"]; ?&gt;&lt;/td&gt;
  </code></pre>
  
  <p>So, every time I load, <code>en/</code> or <code>fr/</code> or other language, I request the exchange rates from a external site.</p>
  
  <p>Can I optimize this behavior (reading once per day or session)?</p>
  
  <p>maybe to store a global variable and check the update date?</p>