OpenTreeMap / otm-core

OpenTreeMap is a collaborative platform for crowdsourced tree inventory, ecosystem services calculations, urban forestry analysis, and community engagement.
www.opentreemap.org
Other
188 stars 87 forks source link

Update universal rev after changing instance units. #3225

Closed jwalgran closed 7 years ago

jwalgran commented 7 years ago

Overview

Calculating ecobenefits for a large number of trees can be expensive, so we cache the results based on query string arguments and the universal_rev of the instance. After changing the units of a field, the same query string can produce different results so we must increment the universal_rev to bust the cache.

Connects #3224

Testing Instructions

jwalgran commented 7 years ago

@mmcfarland I added a fixup to implement a comment from Mike.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.002%) to 83.867% when pulling 1fa6b5f5a577537623900da84ac557fbbbf8d6c0 on jwalgran:jcw/update-rev-on-unit-save into 43f2f9f2c0dcb7c509b950ab7443b3e848ed7cb2 on OpenTreeMap:hotfix/2.19.1.