OpenTreeMap is a collaborative platform for crowdsourced tree inventory, ecosystem services calculations, urban forestry analysis, and community engagement.
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.
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.
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 theuniversal_rev
to bust the cache.Connects #3224
Testing Instructions
Create a new instance with the URL name
unit-eco-test
via http://localhost:6060/createAdd three trees with the following diameters
Click the "Advanced" button above the "Search" button and in the "Tree" down down enter a range of 3in to 8in.
Click "Search" and verify that "3 Trees" appears in the search result
Go to the units management page http://localhost:6060/unit-eco-test/management/units/
centimeters
?update_universal_rev=1
Click "Explore Map" in the header.
Run the same advanced search for tree diameter, entering 3 and 8 into the range boxes (the unit label will now be cm.
Click "Search" and verify that only "1 Tree" is shown in the search results.
Go to the "Basic Information" management page http://localhost:6060/unit-eco-test/management/site-config/
update_universal_rev
query parameter.