Added merge() function to BagOStuff for CAS-like functionality.
authorMatthias Mullie <git@mullie.eu>
Mon, 1 Oct 2012 14:05:22 +0000 (16:05 +0200)
committerMatthias Mullie <git@mullie.eu>
Thu, 10 Jan 2013 08:03:09 +0000 (09:03 +0100)
commit74f581e34871d3d2f711aaec32a09dfaaa46bd17
tree98329883163408e6a2147ba82beb0f7ff627ed38
parente1921d5c5b5b4805d62b330738044277608061d5
Added merge() function to BagOStuff for CAS-like functionality.

* merge() will use CAS if supported or use locking otherwise
* The lock()/unlock() methods now have a default implementation
* added unit tests for merge

Change-Id: Ic27088488f8532f149cb4b36e156516f22880134
16 files changed:
includes/objectcache/APCBagOStuff.php
includes/objectcache/BagOStuff.php
includes/objectcache/DBABagOStuff.php
includes/objectcache/EhcacheBagOStuff.php
includes/objectcache/EmptyBagOStuff.php
includes/objectcache/HashBagOStuff.php
includes/objectcache/MemcachedBagOStuff.php
includes/objectcache/MemcachedClient.php
includes/objectcache/MemcachedPeclBagOStuff.php
includes/objectcache/MultiWriteBagOStuff.php
includes/objectcache/RedisBagOStuff.php
includes/objectcache/SqlBagOStuff.php
includes/objectcache/WinCacheBagOStuff.php
includes/objectcache/XCacheBagOStuff.php
tests/phpunit/MediaWikiPHPUnitCommand.php
tests/phpunit/includes/objectcache/BagOStuffTest.php [new file with mode: 0644]