replayweb.page icon indicating copy to clipboard operation
replayweb.page copied to clipboard

Invalidate cache when remote file has changed.

Open ikreymer opened this issue 2 years ago • 2 comments

For a remote WARC or WACZ, need to detect if it has changed and due a purge cache + full reload before trying to load anything, as all previously cached data should be considered invalid.

This is a bit tricky as need to determine when to check the file after initial load, and how to determine that it's changed. (Look for etag? Just file size perhaps for now?) The cached data may still be usable, as long as no additional data is loaded, so maybe a warning is needed instead of triggering an automatic reload..

ikreymer avatar Nov 15 '22 06:11 ikreymer

I'm not sure If I have same issue...

  1. I create file1.wacz (snapshot of page1), open it and see content at time1
  2. I create updated file from the same site (snapshot of page1, but newer), and name it with the same name file1.wacz, and place it at the same place. When I open it, I see old cached version at time1. When I rename it to file2.wacz, it shows correct content at time2. I rename it back to file1.wacz, open it again, and again see old content at time1. I tried to do Force Reload, but it's just stuck at 0% and never progresses. Datetime of that file1.wacz is updated to newer time (and newer size) when it changed

I ended up deleting c:\Users%USER%\AppData\Roaming\replaywebpage\ completely and that finally cleared the cache

llamerr avatar Jan 22 '23 15:01 llamerr

Bumping this issue back up as it is something we experience in live demos while combining archived items via collections. Marking as a bug because it will not work for users unless the cache is invalidated — something we cannot expect users to know by default.

Shrinks99 avatar Aug 10 '24 19:08 Shrinks99