objectcache: make WANObjectCache prefer ADD over GET/CAS for misses
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 28 Mar 2019 03:09:06 +0000 (20:09 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Thu, 28 Mar 2019 09:42:55 +0000 (09:42 +0000)
commit35af086e57d5faa0ed282d0c67121ee684a0d2f8
tree8d0f8b51db7b13c0f9562e0bf2b562c199ad70bb
parentdecb91ea5234ad8508edd00982f5af46d30fbbe1
objectcache: make WANObjectCache prefer ADD over GET/CAS for misses

This avoids an extra cache query and also avoids I/O if another thread
already saved the value in the meantime, bloating the GET response.

Bug: T203786
Change-Id: I05539873f55d3254e2b9ecad0df158db1e6a1a1a
includes/libs/objectcache/WANObjectCache.php