r89713 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89712‎ | r89713 | r89714 >
Date:00:53, 8 June 2011
Author:demon
Status:ok
Tags:
Comment:
Revert r87145, bug 28752: Xcache doesn't work in cli mode. As pointed out on CR, this didn't fix it, it just hid the issue.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.18 (modified) (history)
  • /trunk/phase3/includes/objectcache/XCacheBagOStuff.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.18
@@ -246,7 +246,6 @@
247247 left-to-right.
248248 * (bug 28719) Do not call mLinkHolders __destruct explicitly
249249 * (bug 21196) Article::getContributors() no longer fails on PostgreSQL.
250 -* (bug 28752) XCache doesn't work in CLI mode.
251250 * (bug 28076) Thumbnail height limited to 360 pixels on Special:Listfiles
252251 * (bug 22227) Special:Listfiles no longer throws an error on bogus file entries
253252 * (bug 19408) user_properties.up_property: 32 bytes is not enough.
Index: trunk/phase3/includes/objectcache/XCacheBagOStuff.php
@@ -8,27 +8,12 @@
99 */
1010 class XCacheBagOStuff extends BagOStuff {
1111 /**
12 - * Are we operating in CLI mode? Since xcache doesn't work then and they
13 - * don't want to change that
14 - * @see bug 28752
15 - * @var bool
16 - */
17 - private $isCli = false;
18 -
19 - public function __construct() {
20 - $this->isCli = php_sapi_name() == 'cli';
21 - }
22 -
23 - /**
2412 * Get a value from the XCache object cache
2513 *
2614 * @param $key String: cache key
2715 * @return mixed
2816 */
2917 public function get( $key ) {
30 - if( $this->isCli ) {
31 - return false;
32 - }
3318 $val = xcache_get( $key );
3419
3520 if ( is_string( $val ) ) {
@@ -47,9 +32,7 @@
4833 * @return bool
4934 */
5035 public function set( $key, $value, $expire = 0 ) {
51 - if( !$this->isCli ) {
52 - xcache_set( $key, serialize( $value ), $expire );
53 - }
 36+ xcache_set( $key, serialize( $value ), $expire );
5437 return true;
5538 }
5639
@@ -61,9 +44,7 @@
6245 * @return bool
6346 */
6447 public function delete( $key, $time = 0 ) {
65 - if( !$this->isCli ) {
66 - xcache_unset( $key );
67 - }
 48+ xcache_unset( $key );
6849 return true;
6950 }
7051 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r87145(bug 28752) XCache doesn't work in CLI modedemon22:40, 29 April 2011

Status & tagging log