You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems to me that the cache is not updated, when newer files are available on the server.
To test, I wrote this little test:
public void testServerReturnsDocumentNewerThanCache() throws Exception {
server.enqueue(new MockResponse().setBody("A")
.addHeader("Last-Modified: " + formatDate(-4, TimeUnit.HOURS)));
server.enqueue(new MockResponse().setBody("B")
.addHeader("Last-Modified: " + formatDate(-2, TimeUnit.HOURS)));
server.play();
Seems to me that the cache is not updated, when newer files are available on the server.
To test, I wrote this little test:
public void testServerReturnsDocumentNewerThanCache() throws Exception {
server.enqueue(new MockResponse().setBody("A")
.addHeader("Last-Modified: " + formatDate(-4, TimeUnit.HOURS)));
server.enqueue(new MockResponse().setBody("B")
.addHeader("Last-Modified: " + formatDate(-2, TimeUnit.HOURS)));
server.play();
It fails on the last assert. A is returned instead of B.
The text was updated successfully, but these errors were encountered: