title: Does Github pages have a built in way of accessing and caching the latest release from the API?
body: <p>Learning Jekyll and hosting through Github Pages I'm trying to figure out how to access a <em>private repo</em>'s latest release and cache the download URLs to a Jekyll page. I know how to access the data through the Github API with an access token using AJAX:</p>
  
  <pre><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script language="javascript" type="text/javascript"&gt;  
  
    let USER = "grim"
    let REPO = "foobar"
    let TOKEN = "jsfjksgfjasgdjgsajgasjk"
    $.ajax({
      url: `https://api.github.com/repos/${USER}/${REPO}/releases/latest?access_token=${TOKEN}`,
      jsonp: true,
      method: "GET",
      dataType: "json",
      contentType: 'application/json',
      success: function(res) {
        console.log(res.assets)
      },
      error: function(res) {
        console.log(res)
      }
    })
  &lt;/script&gt;
  </code></pre>
  
  <p>In the <em>config.yml</em> I'm setting the <code>USER</code>, <code>REPO</code> and <code>TOKEN</code>. My research I did find the <a href="https://github.com/envygeeks/jekyll-cache" rel="noreferrer">Cache API</a> but it isn't <a href="https://pages.github.com/versions/" rel="noreferrer">listed</a>. Using Github Pages as the host and coded in Jekyll is there a way to get the latest release and cache the response on a private repo with Jekyll? If I cannot cache the API is there a way to store the release URLs on the Jekyll build so I can code it to the buttons so the buttons act as a download?</p>
  
  <p>Research:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/21439239/download-latest-github-release">Download latest GitHub release</a></li>
  <li><a href="https://alligator.io/js/cache-api/" rel="noreferrer">First Steps with the Cache API</a></li>
  <li><a href="https://stackoverflow.com/questions/24098792/how-to-force-github-pages-build">How to force GitHub Pages build?</a></li>
  <li><a href="https://stackoverflow.com/questions/24987542/is-there-a-link-to-github-for-downloading-a-file-in-the-latest-release-of-a-repo">Is there a link to GitHub for downloading a file in the latest release of a repository?</a></li>
  </ul>