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

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


Review Board



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.

  1. Tool: Pyflakes
    Ignored Files:
    Tool: PEP8 Style Checker
    Ignored Files:
  1. Unfortunately, this breaks all API/async caching for everything, which will slow down things for everyone.

    What we really should do is include the interdiff's timestamp in DiffFragmentView.make_etag

    1. I found the core bug. I'll have a fix up soon.

    2. This is fixed at

Review request changed
Change Summary:

Closed in favor of