title: How does relay cache work?
body: <p>I read through the relay cache documentation, but it felt confusing.</p>
  
  <p>Can anyone explain how does the primeCache work and how it should/could be used?</p>
  
  <p>First things first, I'm not even 100% positive whether the cache is in browser, or in the server side? I would guess it's in the browser, since they do talk about client caching, am I right?</p>
  
  <p>I also have read this <a href="https://stackoverflow.com/questions/34409268/relay-cache-with-flux-pattern">question</a>, and it confuses me more. It says </p>
  
  <blockquote>
    <p>If the Flux stores need access to server data, they can use the Relay.Store APIs to fetch data from the server and read it from the cache.</p>
  </blockquote>
  
  <p>I don't understand, if it is going to read it from the cache, then why would it need to fetch data from the server? No logic in that to be honest. Unless if it's really a server cache instead of a browser cache? Also if you look at the Relay documentation about Relay.Store (which does relate to the primeCache), they say that: </p>
  
  <blockquote>
    <p>The Relay Store provides an API for dispatching mutations to the server.</p>
  </blockquote>
  
  <p>And if I have understood correctly, those mutations change data in the server side. Which means they do query the server side through the store. And because you use the store to access the primeCache, it could imply that the cache could really be server side mm..</p>
  
  <p>What about when can you call the primeCache? What if there isn't anything inside the cache and you call it? Does it then get the result from the server?</p>
  
  <p>Please help</p>