astaxie/beego — pull request #809 by haowang1013 (2014-09-09 08:26:00+00:00)
Title: changed Cache.Incr/Cache.Decr to also return the updated counter

this is done for 2 reasons:
- it saves another "get" operation if the caller needs the counter immediately, so the code is more efficient
- the code is more reliable in multi-threading environment because previously there is no way for the caller to get the updated counter
since the update and get are separate operations. after the change, everything is done in the same atomic operation.