Fix overzealous saving/clearing of the siteconfig cache for avatar settings.

Review Request #8874 - Created April 5, 2017 and submitted

Christian Hammond
Djblets
release-0.10.x
82acd93...
djblets
When populating the avatars registry, the list of enabled backends and
the default backend are saved into the siteconfig, which then results in
the siteconfig being dirty. This can cause the siteconfig cache to be
emptied too often, as it's being cleared on all threads every time a new
thread spins up, along with a couple times during initial setup of the
avatar support.

Now the settings are conditionally written to the siteconfig only if
they've changed, ensuring we don't save unless we have something useful
to save

Unit tests pass.

No longer saw my debug info showing the siteconfig cache was being
cleared, or the extra siteconfig database queries.

  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
Barret Rennie
Barret Rennie
Christian Hammond
David Trowbridge
Christian Hammond
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-0.10.x (398b502)
Loading...