HashBagOStuff: use the value itself as the CAS token
authorTim Starling <tstarling@wikimedia.org>
Tue, 7 Oct 2014 05:24:45 +0000 (16:24 +1100)
committerTim Starling <tstarling@wikimedia.org>
Tue, 7 Oct 2014 05:29:57 +0000 (16:29 +1100)
commit9f0d40e08f1b8b562d89457a6c1a0eb5dbfa7828
tree1c8db31aa8d3091249bcecff83127ddf4db0ea83
parent17adab6135bc52b6affe1634f68eb10cf0f9f080
HashBagOStuff: use the value itself as the CAS token

Avoid an unnecessary serialize() call on get() requests, which makes it
faster and also happens to work around a nasty crash bug which is
causing lots of segfaults right now.

CAS semantics should be the same, if the caller handles a CAS token in
an opaque way and does not assume it is a string. I could only find one
caller of cas() in core and WMF deployed extensions, and that is
BagOStuff::mergeViaCas(), which does correctly handle CAS tokens of any
type.

Bug: 71724
Change-Id: I0b0b5f0157c005ec7f76210dfb8576c056314733
includes/objectcache/HashBagOStuff.php