2600hz/kazoo — pull request #175 by archimed-shaman (2013-12-07 19:09:57+00:00)
Title: fix: stale cache while updating objects

> When I send a POST update the parameters of queue I recieve:
> {"auth_token":"502b392f9a4eb160323330fa9ba78bb8","request_id":"f41894441304285898df11e9a42d2a50","status":"error","message":"conflicting documents","error":"409","data":{}}
>
> Interesting that it appears only for newly created queues, for queues that were created earlier I don't receive this error.

https://groups.google.com/forum/?hl=ru#!topic/2600hz-dev/M7gdOeiYLEQ

This issue is caused by obsolete revision number, stored in cache by the first call of couch_mgr:open_cache_doc function. New revisions does not fall into the cache while updating the entries, as the cache is not synchronized with couch db. So the easiest way is to clear the cache manually after the data update. It will be refilled after the first data access.