title: Getting data from cache before executing a network request with RoboSpice
body: <p>I'm using RoboSpice and want to have the following behavior in my app:</p>
  
  <ul>
  <li>User starts an activity that needs data from server</li>
  <li>spiceManager checks if data is cached, returning it if so.</li>
  <li>regardless of wether cached data was returned, a request to the server is made</li>
  <li>when fresh data arrives from server, I update UI with it (if activity is still active)</li>
  </ul>
  
  <p>It should be something like facebook app: when you open it, you instantly see an outdated timeline, and receive an update eventually.</p>
  
  <p>At first I thought <code>spiceManager.getFromCacheAndLoadFromNetworkIfExpired()</code> was a good way to achieve this, but if data is cached and valid, it justs returns cache without making a network request right after it. I've tried it both with <code>DurationInMillis.ALWAYS_EXPIRED</code> and <code>DurationInMillis.ALWAYS_RETURNED</code>.</p>
  
  <p>Should I use <code>getFromCache()</code> to retrieve cached data and then, from within <code>onRequestSuccess()</code>, call <code>spiceManager.execute()</code> with always_expired as parameter? Or there is a better/simpler way to do this?</p>
  
  <p>Thanks in advance for any help!</p>
  
  <p>[edit]
  these links may add to the discussion:
  <a href="https://groups.google.com/forum/#!topic/robospice/n5ffupPIpkE/discussion" rel="nofollow">https://groups.google.com/forum/#!topic/robospice/n5ffupPIpkE/discussion</a>
  <a href="https://groups.google.com/forum/#!topic/robospice/LtoqIXk5JpA" rel="nofollow">https://groups.google.com/forum/#!topic/robospice/LtoqIXk5JpA</a></p>