OpenTreeMap/OTM2 — pull request #1713 by jwalgran (2014-10-09 00:26:59+00:00)
Title: Fix cache saving stale data

After fixing a problem with object caches not being correctly invalidated we discovered a regression. Saving instance properties would trigger the object cache system to increment the timestamp on the instance and save it a second time. Unfortunately, it was also saving old field values, overwriting the changes.

The solution is to fetch the object from the database before incrementing the counter, ensuring that we do not write back stale values.