Fix constant recalculation of integration configurations.

Review Request #8780 — Created Feb. 25, 2017 and submitted — Latest diff uploaded

Information

Djblets
release-0.10.x
3166a1e...

Reviewers

We have code that attempts to check if the local configurations state is
stale, due to new integrations being registered or another
thread/process changing configuration. We have a flag that determines
whether we need to perform a recalculation due to local configuration
changes, which we happily set to True when registering an integration
but fail to ever set back to False, meaning that once expired, always
expired. This leads to a recalculation happening per-request, which is
not at all efficient. Unfortunately, unit tests failed to check for
this.

We now simply clear the flag after recalculating, as intended. Unit
tests have been updated to check that the resulting state is correct.

Unit tests pass.

No longer saw a SQL query for configurations for every HTTP request.