Project

General

Profile

Actions

Bug #19899

closed

Stale cache wb2 in collection file list

Added by Peter Amstutz over 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Keep
Story points:
1.0
Release relationship:
Auto

Description

Observed with the following sequence of events:

  1. Create an empty collection
  2. Visit the empty collection with Workbench 2
  3. Use arv-put --update-collection to upload a file to the collection
  4. Hit "Refresh" on the collection page
  5. The file list panel remains empty

The panel remains empty across visiting different collections and coming back as well as reloading the page, which suggests this is a caching issue, either the browser caching the keep-web response, or (more likely?) keep-web caching the collection listing.

After a couple minutes, the file I uploaded with arv-put started showing up.

Discussion on 1/5

keep-web supports "Cache-Control: no-cache" and "...must-revalidate" headers, but currently workbench2 does not use them, even when the user explicitly asks for a refresh.

Another possibility is for workbench2 to use the PDH rather than UUID when requesting file listings. (However, if the user clicks through to view file content at a webdav url, they might still receive old/cached content.)

Another possibility is adding a keep-web feature allowing the client's request header to supply the expected PDH when requesting file listings/content by collection UUID. If the PDH of the keep-web cache doesn't match, this would force a reload. This would be better than the previous approach in that when the user subsequently clicks through to the file content, the cache will also be up to date.

Plan

  • Write a cypress test that demonstrates the bug (loads the collection page, then modifies the collection on the API server, then reloads the page and checks for the change)
  • Add "Cache-control: must-revalidate" to the WebDAV requests
  • Confirm that the cypress test passes with the addition of the Cache-control header.

Subtasks 1 (0 open1 closed)

Task #20049: Review 19899-webdav-cache-controlResolvedLucas Di Pentima03/06/2023Actions

Related issues

Related to Arvados Workbench 2 - Bug #20142: Automatic refresh after removing files within a collection does not workDuplicateActions
Actions

Also available in: Atom PDF