Commit graph

17 commits

Author SHA1 Message Date
Sam Reed
e514478ba5 Fix function level comments that start with /* not /** 2011-05-21 19:35:16 +00:00
Sam Reed
f985524076 More versions added to @deprecated tags
Couple of inbound calls fixed up

Some ancient code removed as it's been marked deprecated
2011-05-06 21:50:18 +00:00
Chad Horohoe
8ae2840afb Make this private since nothing outside here calls it 2011-04-29 22:40:31 +00:00
Chad Horohoe
2323830a03 (bug 28752) XCache doesn't work in CLI mode 2011-04-29 22:40:12 +00:00
Sam Reed
bc1c6d2a6b More parameter and return type hints 2011-04-25 22:41:54 +00:00
Platonides
ec455d68fa (Bug 28611) Don't die in SqlBagOStuff::incr() if there's a race condition. 2011-04-19 17:59:59 +00:00
Tim Starling
e27500be17 In SQLBagOStuff: make it possible to change the purge period, or disable purging altogether. At Domas's suggestion, for deployment to Wikimedia very soon. 2011-04-12 03:59:47 +00:00
Sam Reed
bccd879a46 Add/tweak/update documentation and add some explicit defintions with type descriptions 2011-03-25 10:56:54 +00:00
Platonides
4cba30ab1b Comment the var_dump() and add a comment.
Follow up r83208.
2011-03-08 00:20:26 +00:00
Platonides
8f0a89efcb Reorder so that wfProfileOut() is the last sentence before the return. 2011-03-06 23:29:29 +00:00
Platonides
9ced2d5c60 Follow up r83140. Add a clear() method to ObjectCache so that it can be used by ForkController. 2011-03-06 23:07:36 +00:00
Tim Starling
f509ce8060 * Added an Ehcache client.
* Fixed encoding of spaces in memcached keys, in r83140 they would have been encoded as "+".
2011-03-04 06:01:30 +00:00
Tim Starling
88161eff47 * When CACHE_ANYTHING is requested, return the cached instance, don't construct a new object for each use.
* In MemcachedSessions.php, register a shutdown function to shut down the session early, before $wgMemc is destroyed. I'm not sure why my recent changes caused this problem to show up now. 
* Use EmptyBagOStuff instead of FakeMemCachedClient in DefaultSettings.php for CACHE_NONE.
2011-03-03 15:24:51 +00:00
Chad Horohoe
10a2ec8072 Tweak debug() to use name of class in debug output 2011-03-03 12:52:30 +00:00
Tim Starling
be76d86932 * Rewrote ObjectCache.php to conform to the modern coding style, and to be less convoluted about how CACHE_ANYTHING and CACHE_ACCEL are resolved. Moved most functionality to static members of a new ObjectCache class.
* Moved the global functions to GlobalFunctions.php, where they are now just convenience wrappers. Made them return non-references. Updated callers (none found in extensions). 
* Added an advanced configuration method, $wgObjectCaches, which allows a lot more detail in the object cache configuration than $wgMainCacheType. 
* Made all object cache classes derive from BagOStuff. 
* Split the MWMemcached class into a generic client class and a MediaWiki-specific wrapper class. The wrapper class presents a simple BagOStuff interface to calling code, hiding memcached client internals, and will simplify the task of supporting the PECL extension.
* Added some extra constructor parameters to MWMemcached, configurable via $wgObjectCaches.
* Removed the *_multi() methods from BagOStuff, my grepping indicates that they are not used.
* Rewrote FakeMemCachedClient as a BagOStuff subclass, called EmptyBagOStuff.
* Added an optional "server" parameter to SQLBagOStuff. This allows the server holding the objectcache table to be different from the server holding the core DB.
* Added MultiWriteBagOStuff: a cache class which writes to multiple locations, and reads from them in a defined fallback sequence. This can be used to extend the cache space by adding disk-backed storage to existing in-memory caches.
* Made MWMemcached::get() return false on failure instead of null, to match the BagOStuff documentation and the other BagOStuff subclasses. Anything that was relying on it returning null would have already been broken with SqlBagOStuff.
* Fixed a bug in the memcached client causing keys with spaces or line breaks in them to break the memcached protocol, injecting arbitrary commands or parameters. Since the PECL client apparently also has this flaw, I implemented the fix in the wrapper class.
* Renamed BagOStuff::set_debug() to setDebug(), since we aren't emulating the memcached client anymore
* Fixed spelling error in MWMemcached: persistant -> persistent
2011-03-03 09:37:37 +00:00
Tim Starling
d3f36ffd4d More renames and splits for objectcache reorganisation. 2011-03-03 04:48:14 +00:00
Tim Starling
af04dde290 Start of ObjectCache reorganisation. Moved the object cache files to includes/objectcache/. Split BagOStuff.php into single-class files. 2011-03-03 04:38:17 +00:00