fix(ajax-caching): avoid caching ajax GET requests via unique '_' param value

Review Request #7695 — Created Oct. 13, 2015 and discarded — Latest diff uploaded

Information

Review Board

Reviewers

Summary

Using version 2.0.18 of reviewboard running as a WSGIDaemon process on Apache, backed by memcached, our users are experiencing a problem where they would see stale diffs after updating the files in a published diff. After some debugging, we tracked this down to browser caching.

To Reproduce

  1. Create pending change with file foo with content "bar baz"
  2. Submit to reviewboard
  3. Publish
  4. Add line "doo doo doo" to file foo
  5. Submit to reviewboard
  6. Realize you forgot the very important line "da da da" and add that to file foo
  7. Submit to reviewboard

The diff between Orig and 2 and the diff between 1 and 2 will show different things. 1 and 2 won't show the newest change ("da da da")

If you do a hard refresh while diffing 1 and 2, it will update correctly.

Chrome Version 45.0.2454.101 m

See reproducer steps. Tested before the code was patched in vs after. Before, only a hard refresh of the page would update the diffs, whereas after, that wasn't necessary.

    Loading...