Skip to content

Don't use cached value for snippet edit

Vasilii Iakliushin requested to merge 425689_fix_snippet_reload into master

What does this MR do and why?

Contributes to #425689 (closed)

Problem

Axios doesn't seem to support Etags correctly. It relies on Cache-Control and doesn't revalidate the snippet content with If-None-Match header.

Solution

Explicitly disable cache when fetching snippet blob to prevent displaying state data.

How to set up and validate locally

  1. Create a new snippet http://gdk.test:3000/-/snippets/new with content: 111
  2. Save the snippet
  3. Click Edit button and change the content to 222
  4. Save the snippet
  5. Quickly click Edit button again
  6. You should see 222 (in current master it will display 111 instead)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Vasilii Iakliushin

Merge request reports