Bump AJAX_SERIAL when bumping the Extension sync generation.

Review Request #4874 — Created Nov. 1, 2013 and submitted

Information

Djblets
release-0.7.x

Reviewers

Bump AJAX_SERIAL when bumping the Extension sync generation.

Extensions often affect many aspects of page rendering. Pages that make
use of AJAX_SERIAL in their cache keys expect that a change to a
template will cause a change to the cache key. It therefore makes sense
to bump AJAX_SERIAL when we bump the extension sync generation (which
happens when enabling/disabling an extension or changing extension
configuration).

With this change, any pages that properly use AJAX_SERIAL will
invalidate their cache any time an extension makes a change that may,
for example, toggle a feature on or off.

Reinstalled Power Pack without a license. Went to a review request with
a PDF, and saw that it didn't render the thumbnail.

Set a valid license in Power Pack, reloaded the review request, and saw a thumbnail.

Disabled the extension, reloaded, and the thumbnail disappeared.

Re-enabled, reloaded, and the thumbnail appeared again.

chipx86
  1. Hmm, realized there's a scenario that may cause problems:

    If you start RB up, you'll get an AJAX_SERIAL of, say, 100. Mess with extensions a bit, and you'll get, say, 105. Flush the cache, restart the server, and you're back at 100, causing cache issues for anyone who still has that ETag in their page.

    Need to rethink part of this.

  2. 
      
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed