Find: /isset\(\s*([^()]+?)\s*\)\s*\?\s*\1\s*:\s*/
Replace with: '\1 ?? '
(Everywhere except includes/PHPVersionCheck.php)
(Then, manually fix some line length and indentation issues)
Then manually reviewed the replacements for cases where confusing
operator precedence would result in incorrect results
(fixing those in I478db046a1cc162c6767003ce45c9b56270f3372).
Change-Id: I33b421c8cb11cdd4ce896488c9ff5313f03a38cf
This simply involves passing it through to the set() call
Also added some related commons to adaptiveTTL() involving
usage of this option.
Change-Id: Id5833a5d4efb6cad2eb646832e5b0188e86e12fc
This is the only usage of wikimedia/assert in the planned objectcache
library, so it doesn't make much sense to have a dependency upon the
entire library just for one usage that is trivially replaced.
Change-Id: I8f967fb2b861852c7fc74f7d42e2cbab1df05bc4
* Match behaviour of MapCacheLRU and ProcessCacheLRU.
* Add missing unit tests for TTL and maxCacheKeys eviction behaviour.
Change-Id: I559eae1cd336274b21728e86775cfbad7e2f2c6d
Especially useful when interacting with getWithSetCallback of
HashBagOStuff where a $exptime is required before the callback.
In set() it is typically left out and thus not as counter-intuitive.
Change-Id: Ic2f7adda3c00cefe701d77bea91a7e8e77ef1439
* This blocks on writing to all replicas
and returns false if any failed.
* This is useful if ChronologyProtector is to work across
domains by having the writes go everywhere so that later
reads will see them (and be local at the same time).
* Redundant doc comments were also removed.
Change-Id: I9ed098d563c64dba605e7809bc96731da3b3e79d
* Callers of get() no longer have to contend with
the annoying $casToken parameter, which is there
but totally unusable to non-BagOStuff code.
* The default get() now delegates to doGet(),
which callers must implement instead. They can
ignore the overhead of generating $casToken if
they do not implement cas(), which applies to
callers that use the stock merge(). If cas() is
used for merge(), then getWithToken() must be
implemented.
* Also add BagOStuff::READ_LATEST to mergeViaCas()
for sanity, as that missing before.
Likewise with mergeViaLock().
Change-Id: I4efce6a9ab4b1eadd2f161dff641004a7239c516
* This uses a non-blocking $wgMemc lock to reserve the user
name in question. This should prevent two threads from
reaching LOCK IN SHARE MODE and getting stuck on INSERT.
The lock is global to better cover auth plugins.
* This adds a BagOStuff::getScopedLock() convenience method.
It uses less queries than LockManager by being EX only.
* Avoid extra lock attempt in lock() in non-blocking mode.
* Removed (un)lock() HashBagOStuff overrides that made it
behave differently than other caches (wrt to re-entrance).
Bug: T106850
Change-Id: Iecf95206d712367f5d202f76ab0eaa9d7bdabf2b
The base BagOStuff class and some of the implementations are
not dependent on MediaWiki and can be in the libs folder.
Change-Id: I299f9abb778abc65a70461a2aff3015c02a1f04d
2015-02-25 00:22:50 -08:00
Renamed from includes/objectcache/HashBagOStuff.php (Browse further)