2006-08-29 15:43:34 +00:00
|
|
|
<?php
|
WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>
Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage
One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
|
|
|
/**
|
2012-05-22 18:06:30 +00:00
|
|
|
* Response handler for Ajax requests.
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
* http://www.gnu.org/copyleft/gpl.html
|
2010-08-08 14:23:14 +00:00
|
|
|
*
|
WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>
Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage
One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
|
|
|
* @file
|
|
|
|
|
* @ingroup Ajax
|
|
|
|
|
*/
|
|
|
|
|
|
2007-04-04 05:22:37 +00:00
|
|
|
/**
|
2008-08-20 22:22:29 +00:00
|
|
|
* Handle responses for Ajax requests (send headers, print
|
|
|
|
|
* content, that sort of thing)
|
2010-02-14 22:07:30 +00:00
|
|
|
*
|
WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>
Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage
One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
|
|
|
* @ingroup Ajax
|
2007-04-04 05:22:37 +00:00
|
|
|
*/
|
2006-08-29 15:43:34 +00:00
|
|
|
class AjaxResponse {
|
2012-04-15 00:12:01 +00:00
|
|
|
/**
|
|
|
|
|
* Number of seconds to get the response cached by a proxy
|
|
|
|
|
* @var int $mCacheDuration
|
|
|
|
|
*/
|
2007-05-05 00:06:20 +00:00
|
|
|
private $mCacheDuration;
|
|
|
|
|
|
2012-04-15 00:12:01 +00:00
|
|
|
/**
|
|
|
|
|
* HTTP header Content-Type
|
|
|
|
|
* @var string $mContentType
|
|
|
|
|
*/
|
2007-05-05 00:06:20 +00:00
|
|
|
private $mContentType;
|
|
|
|
|
|
2012-04-15 00:12:01 +00:00
|
|
|
/**
|
|
|
|
|
* Disables output. Can be set by calling $AjaxResponse->disable()
|
|
|
|
|
* @var bool $mDisabled
|
|
|
|
|
*/
|
2007-05-05 00:06:20 +00:00
|
|
|
private $mDisabled;
|
|
|
|
|
|
2012-04-15 00:12:01 +00:00
|
|
|
/**
|
|
|
|
|
* Date for the HTTP header Last-modified
|
2014-04-22 11:07:02 +00:00
|
|
|
* @var string|bool $mLastModified
|
2012-04-15 00:12:01 +00:00
|
|
|
*/
|
2007-05-05 00:06:20 +00:00
|
|
|
private $mLastModified;
|
|
|
|
|
|
2012-04-15 00:12:01 +00:00
|
|
|
/**
|
|
|
|
|
* HTTP response code
|
|
|
|
|
* @var string $mResponseCode
|
|
|
|
|
*/
|
2007-05-05 00:06:20 +00:00
|
|
|
private $mResponseCode;
|
|
|
|
|
|
2012-04-15 00:12:01 +00:00
|
|
|
/**
|
|
|
|
|
* HTTP Vary header
|
|
|
|
|
* @var string $mVary
|
|
|
|
|
*/
|
2007-05-05 00:06:20 +00:00
|
|
|
private $mVary;
|
|
|
|
|
|
2012-04-15 00:12:01 +00:00
|
|
|
/**
|
|
|
|
|
* Content of our HTTP response
|
|
|
|
|
* @var string $mText
|
|
|
|
|
*/
|
2007-05-05 00:06:20 +00:00
|
|
|
private $mText;
|
2006-08-29 15:43:34 +00:00
|
|
|
|
2014-08-26 02:14:41 +00:00
|
|
|
/**
|
|
|
|
|
* @var Config
|
|
|
|
|
*/
|
|
|
|
|
private $mConfig;
|
|
|
|
|
|
2012-03-05 15:23:04 +00:00
|
|
|
/**
|
2014-04-22 11:07:02 +00:00
|
|
|
* @param string|null $text
|
2014-08-26 02:14:41 +00:00
|
|
|
* @param Config|null $config
|
2012-03-05 15:23:04 +00:00
|
|
|
*/
|
2014-08-26 02:14:41 +00:00
|
|
|
function __construct( $text = null, Config $config = null ) {
|
2009-12-11 21:07:27 +00:00
|
|
|
$this->mCacheDuration = null;
|
|
|
|
|
$this->mVary = null;
|
2014-08-26 02:14:41 +00:00
|
|
|
$this->mConfig = $config ?: ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
|
2007-01-09 20:25:28 +00:00
|
|
|
|
2006-08-29 15:43:34 +00:00
|
|
|
$this->mDisabled = false;
|
|
|
|
|
$this->mText = '';
|
2015-06-11 15:13:00 +00:00
|
|
|
$this->mResponseCode = 200;
|
2006-08-29 15:43:34 +00:00
|
|
|
$this->mLastModified = false;
|
2010-02-14 22:07:30 +00:00
|
|
|
$this->mContentType = 'application/x-wiki';
|
2007-01-09 20:25:28 +00:00
|
|
|
|
2006-08-29 15:43:34 +00:00
|
|
|
if ( $text ) {
|
|
|
|
|
$this->addText( $text );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2012-04-15 00:12:01 +00:00
|
|
|
/**
|
|
|
|
|
* Set the number of seconds to get the response cached by a proxy
|
2014-04-22 11:07:02 +00:00
|
|
|
* @param int $duration
|
2012-04-15 00:12:01 +00:00
|
|
|
*/
|
2006-08-29 15:43:34 +00:00
|
|
|
function setCacheDuration( $duration ) {
|
|
|
|
|
$this->mCacheDuration = $duration;
|
|
|
|
|
}
|
|
|
|
|
|
2012-04-15 00:12:01 +00:00
|
|
|
/**
|
|
|
|
|
* Set the HTTP Vary header
|
2014-04-22 11:07:02 +00:00
|
|
|
* @param string $vary
|
2012-04-15 00:12:01 +00:00
|
|
|
*/
|
2006-08-29 15:43:34 +00:00
|
|
|
function setVary( $vary ) {
|
|
|
|
|
$this->mVary = $vary;
|
|
|
|
|
}
|
|
|
|
|
|
2012-04-15 00:12:01 +00:00
|
|
|
/**
|
|
|
|
|
* Set the HTTP response code
|
2014-04-22 11:07:02 +00:00
|
|
|
* @param string $code
|
2012-04-15 00:12:01 +00:00
|
|
|
*/
|
2006-08-29 15:43:34 +00:00
|
|
|
function setResponseCode( $code ) {
|
|
|
|
|
$this->mResponseCode = $code;
|
|
|
|
|
}
|
2007-01-09 20:25:28 +00:00
|
|
|
|
2012-04-15 00:12:01 +00:00
|
|
|
/**
|
|
|
|
|
* Set the HTTP header Content-Type
|
2014-04-22 11:07:02 +00:00
|
|
|
* @param string $type
|
2012-04-15 00:12:01 +00:00
|
|
|
*/
|
2006-08-29 15:43:34 +00:00
|
|
|
function setContentType( $type ) {
|
|
|
|
|
$this->mContentType = $type;
|
|
|
|
|
}
|
2007-01-09 20:25:28 +00:00
|
|
|
|
2012-04-15 00:12:01 +00:00
|
|
|
/**
|
|
|
|
|
* Disable output.
|
|
|
|
|
*/
|
2006-08-29 15:43:34 +00:00
|
|
|
function disable() {
|
|
|
|
|
$this->mDisabled = true;
|
|
|
|
|
}
|
2007-01-09 20:25:28 +00:00
|
|
|
|
2012-03-05 15:23:04 +00:00
|
|
|
/**
|
|
|
|
|
* Add content to the response
|
2014-04-22 11:07:02 +00:00
|
|
|
* @param string $text
|
2012-03-05 15:23:04 +00:00
|
|
|
*/
|
2006-08-29 15:43:34 +00:00
|
|
|
function addText( $text ) {
|
2014-07-21 12:47:42 +00:00
|
|
|
if ( !$this->mDisabled && $text ) {
|
2006-08-29 15:43:34 +00:00
|
|
|
$this->mText .= $text;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2012-03-05 15:23:04 +00:00
|
|
|
/**
|
|
|
|
|
* Output text
|
|
|
|
|
*/
|
2006-08-29 15:43:34 +00:00
|
|
|
function printText() {
|
2014-07-21 12:47:42 +00:00
|
|
|
if ( !$this->mDisabled ) {
|
2006-08-29 15:43:34 +00:00
|
|
|
print $this->mText;
|
|
|
|
|
}
|
|
|
|
|
}
|
2007-01-09 20:25:28 +00:00
|
|
|
|
2012-03-05 15:23:04 +00:00
|
|
|
/**
|
|
|
|
|
* Construct the header and output it
|
|
|
|
|
*/
|
2006-08-29 15:43:34 +00:00
|
|
|
function sendHeaders() {
|
|
|
|
|
if ( $this->mResponseCode ) {
|
2015-06-11 15:13:00 +00:00
|
|
|
// For back-compat, it is supported that mResponseCode be a string like " 200 OK"
|
|
|
|
|
// (with leading space and the status message after). Cast response code to an integer
|
|
|
|
|
// to take advantage of PHP's conversion rules which will turn " 200 OK" into 200.
|
|
|
|
|
// http://php.net/string#language.types.string.conversion
|
|
|
|
|
$n = intval( trim( $this->mResponseCode ) );
|
2015-06-01 14:31:52 +00:00
|
|
|
HttpStatus::header( $n );
|
2006-08-29 15:43:34 +00:00
|
|
|
}
|
2007-01-09 20:25:28 +00:00
|
|
|
|
2015-06-16 19:06:19 +00:00
|
|
|
header( "Content-Type: " . $this->mContentType );
|
2007-01-09 20:25:28 +00:00
|
|
|
|
2006-08-29 15:43:34 +00:00
|
|
|
if ( $this->mLastModified ) {
|
2015-06-16 19:06:19 +00:00
|
|
|
header( "Last-Modified: " . $this->mLastModified );
|
2010-05-30 14:28:54 +00:00
|
|
|
} else {
|
2015-06-16 19:06:19 +00:00
|
|
|
header( "Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . " GMT" );
|
2006-08-29 15:43:34 +00:00
|
|
|
}
|
2007-01-09 20:25:28 +00:00
|
|
|
|
2006-08-29 15:43:34 +00:00
|
|
|
if ( $this->mCacheDuration ) {
|
2015-12-10 01:30:47 +00:00
|
|
|
# If CDN caches are configured, tell them to cache the response,
|
|
|
|
|
# and tell the client to always check with the CDN. Otherwise,
|
2006-08-29 15:43:34 +00:00
|
|
|
# tell the client to use a cached copy, without a way to purge it.
|
2007-01-09 20:25:28 +00:00
|
|
|
|
2014-08-26 02:14:41 +00:00
|
|
|
if ( $this->mConfig->get( 'UseSquid' ) ) {
|
2013-03-13 07:42:41 +00:00
|
|
|
# Expect explicit purge of the proxy cache, but require end user agents
|
2006-08-29 15:43:34 +00:00
|
|
|
# to revalidate against the proxy on each visit.
|
2015-12-10 01:30:47 +00:00
|
|
|
# Surrogate-Control controls our CDN, Cache-Control downstream caches
|
2007-01-09 20:25:28 +00:00
|
|
|
|
2014-08-26 02:14:41 +00:00
|
|
|
if ( $this->mConfig->get( 'UseESI' ) ) {
|
2010-02-14 22:07:30 +00:00
|
|
|
header( 'Surrogate-Control: max-age=' . $this->mCacheDuration . ', content="ESI/1.0"' );
|
2006-08-29 15:43:34 +00:00
|
|
|
header( 'Cache-Control: s-maxage=0, must-revalidate, max-age=0' );
|
|
|
|
|
} else {
|
2010-02-14 22:07:30 +00:00
|
|
|
header( 'Cache-Control: s-maxage=' . $this->mCacheDuration . ', must-revalidate, max-age=0' );
|
2006-08-29 15:43:34 +00:00
|
|
|
}
|
2007-01-09 20:25:28 +00:00
|
|
|
|
2006-08-29 15:43:34 +00:00
|
|
|
} else {
|
|
|
|
|
# Let the client do the caching. Cache is not purged.
|
2015-06-16 19:06:19 +00:00
|
|
|
header( "Expires: " . gmdate( "D, d M Y H:i:s", time() + $this->mCacheDuration ) . " GMT" );
|
|
|
|
|
header( "Cache-Control: s-maxage={$this->mCacheDuration}," .
|
2014-03-23 01:28:57 +00:00
|
|
|
"public,max-age={$this->mCacheDuration}" );
|
2006-08-29 15:43:34 +00:00
|
|
|
}
|
2007-01-09 20:25:28 +00:00
|
|
|
|
2006-08-29 15:43:34 +00:00
|
|
|
} else {
|
|
|
|
|
# always expired, always modified
|
2015-06-16 19:06:19 +00:00
|
|
|
header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" ); // Date in the past
|
|
|
|
|
header( "Cache-Control: no-cache, must-revalidate" ); // HTTP/1.1
|
|
|
|
|
header( "Pragma: no-cache" ); // HTTP/1.0
|
2006-08-29 15:43:34 +00:00
|
|
|
}
|
2007-01-09 20:25:28 +00:00
|
|
|
|
2006-08-29 15:43:34 +00:00
|
|
|
if ( $this->mVary ) {
|
2015-06-16 19:06:19 +00:00
|
|
|
header( "Vary: " . $this->mVary );
|
2006-08-29 15:43:34 +00:00
|
|
|
}
|
|
|
|
|
}
|
2007-01-09 20:25:28 +00:00
|
|
|
|
2006-08-29 15:43:34 +00:00
|
|
|
/**
|
|
|
|
|
* checkLastModified tells the client to use the client-cached response if
|
2012-12-01 16:02:15 +00:00
|
|
|
* possible. If successful, the AjaxResponse is disabled so that
|
2012-03-05 15:23:04 +00:00
|
|
|
* any future call to AjaxResponse::printText() have no effect.
|
|
|
|
|
*
|
2014-04-22 11:07:02 +00:00
|
|
|
* @param string $timestamp
|
2012-03-05 15:23:04 +00:00
|
|
|
* @return bool Returns true if the response code was set to 304 Not Modified.
|
2006-08-29 15:43:34 +00:00
|
|
|
*/
|
2013-03-18 19:44:43 +00:00
|
|
|
function checkLastModified( $timestamp ) {
|
2006-11-29 11:43:58 +00:00
|
|
|
global $wgCachePages, $wgCacheEpoch, $wgUser;
|
2006-08-29 15:43:34 +00:00
|
|
|
$fname = 'AjaxResponse::checkLastModified';
|
|
|
|
|
|
|
|
|
|
if ( !$timestamp || $timestamp == '19700101000000' ) {
|
2015-12-30 19:48:01 +00:00
|
|
|
wfDebug( "$fname: CACHE DISABLED, NO TIMESTAMP", 'private' );
|
2012-03-05 15:23:04 +00:00
|
|
|
return false;
|
2006-08-29 15:43:34 +00:00
|
|
|
}
|
2010-05-30 14:28:54 +00:00
|
|
|
|
2010-02-14 22:07:30 +00:00
|
|
|
if ( !$wgCachePages ) {
|
2015-12-30 19:48:01 +00:00
|
|
|
wfDebug( "$fname: CACHE DISABLED", 'private' );
|
2012-03-05 15:23:04 +00:00
|
|
|
return false;
|
2006-08-29 15:43:34 +00:00
|
|
|
}
|
2010-05-30 14:28:54 +00:00
|
|
|
|
2006-08-29 15:43:34 +00:00
|
|
|
$timestamp = wfTimestamp( TS_MW, $timestamp );
|
2012-02-16 00:54:34 +00:00
|
|
|
$lastmod = wfTimestamp( TS_RFC2822, max( $timestamp, $wgUser->getTouched(), $wgCacheEpoch ) );
|
2006-08-29 15:43:34 +00:00
|
|
|
|
2010-02-14 22:07:30 +00:00
|
|
|
if ( !empty( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ) ) {
|
2006-08-29 15:43:34 +00:00
|
|
|
# IE sends sizes after the date like this:
|
|
|
|
|
# Wed, 20 Aug 2003 06:51:19 GMT; length=5202
|
|
|
|
|
# this breaks strtotime().
|
|
|
|
|
$modsince = preg_replace( '/;.*$/', '', $_SERVER["HTTP_IF_MODIFIED_SINCE"] );
|
|
|
|
|
$modsinceTime = strtotime( $modsince );
|
|
|
|
|
$ismodsince = wfTimestamp( TS_MW, $modsinceTime ? $modsinceTime : 1 );
|
2015-12-30 19:48:01 +00:00
|
|
|
wfDebug( "$fname: -- client send If-Modified-Since: $modsince", 'private' );
|
|
|
|
|
wfDebug( "$fname: -- we might send Last-Modified : $lastmod", 'private' );
|
2010-05-30 14:28:54 +00:00
|
|
|
|
2014-03-23 01:28:57 +00:00
|
|
|
if ( ( $ismodsince >= $timestamp )
|
|
|
|
|
&& $wgUser->validateCache( $ismodsince ) &&
|
|
|
|
|
$ismodsince >= $wgCacheEpoch
|
|
|
|
|
) {
|
2010-02-14 22:07:30 +00:00
|
|
|
ini_set( 'zlib.output_compression', 0 );
|
2015-06-11 15:13:00 +00:00
|
|
|
$this->setResponseCode( 304 );
|
2006-08-29 15:43:34 +00:00
|
|
|
$this->disable();
|
|
|
|
|
$this->mLastModified = $lastmod;
|
2007-01-09 20:25:28 +00:00
|
|
|
|
2014-03-23 01:28:57 +00:00
|
|
|
wfDebug( "$fname: CACHED client: $ismodsince ; user: {$wgUser->getTouched()} ; " .
|
2015-12-30 19:48:01 +00:00
|
|
|
"page: $timestamp ; site $wgCacheEpoch", 'private' );
|
2007-01-09 20:25:28 +00:00
|
|
|
|
2006-08-29 15:43:34 +00:00
|
|
|
return true;
|
|
|
|
|
} else {
|
2014-03-23 01:28:57 +00:00
|
|
|
wfDebug( "$fname: READY client: $ismodsince ; user: {$wgUser->getTouched()} ; " .
|
2015-12-30 19:48:01 +00:00
|
|
|
"page: $timestamp ; site $wgCacheEpoch", 'private' );
|
2006-08-29 15:43:34 +00:00
|
|
|
$this->mLastModified = $lastmod;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
2015-12-30 19:48:01 +00:00
|
|
|
wfDebug( "$fname: client did not send If-Modified-Since header", 'private' );
|
2006-08-29 15:43:34 +00:00
|
|
|
$this->mLastModified = $lastmod;
|
|
|
|
|
}
|
2012-03-05 15:23:04 +00:00
|
|
|
return false;
|
2006-08-29 15:43:34 +00:00
|
|
|
}
|
2007-01-09 20:25:28 +00:00
|
|
|
|
2011-10-26 03:44:47 +00:00
|
|
|
/**
|
2014-04-22 11:07:02 +00:00
|
|
|
* @param string $mckey
|
|
|
|
|
* @param int $touched
|
2011-10-26 03:44:47 +00:00
|
|
|
* @return bool
|
|
|
|
|
*/
|
2006-08-29 15:43:34 +00:00
|
|
|
function loadFromMemcached( $mckey, $touched ) {
|
2010-05-30 14:28:54 +00:00
|
|
|
if ( !$touched ) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2007-01-09 20:25:28 +00:00
|
|
|
|
2015-10-15 02:45:03 +00:00
|
|
|
$mcvalue = ObjectCache::getMainWANInstance()->get( $mckey );
|
2006-08-29 15:43:34 +00:00
|
|
|
if ( $mcvalue ) {
|
|
|
|
|
# Check to see if the value has been invalidated
|
|
|
|
|
if ( $touched <= $mcvalue['timestamp'] ) {
|
2015-12-30 19:48:01 +00:00
|
|
|
wfDebug( "Got $mckey from cache" );
|
2006-08-29 15:43:34 +00:00
|
|
|
$this->mText = $mcvalue['value'];
|
2010-05-30 14:28:54 +00:00
|
|
|
|
2006-08-29 15:43:34 +00:00
|
|
|
return true;
|
|
|
|
|
} else {
|
2015-12-30 19:48:01 +00:00
|
|
|
wfDebug( "$mckey has expired" );
|
2006-08-29 15:43:34 +00:00
|
|
|
}
|
|
|
|
|
}
|
2007-01-09 20:25:28 +00:00
|
|
|
|
2006-08-29 15:43:34 +00:00
|
|
|
return false;
|
|
|
|
|
}
|
2007-01-09 20:25:28 +00:00
|
|
|
|
2011-10-26 03:44:47 +00:00
|
|
|
/**
|
2014-04-22 11:07:02 +00:00
|
|
|
* @param string $mckey
|
|
|
|
|
* @param int $expiry
|
2011-10-26 03:44:47 +00:00
|
|
|
* @return bool
|
|
|
|
|
*/
|
2006-08-29 15:43:34 +00:00
|
|
|
function storeInMemcached( $mckey, $expiry = 86400 ) {
|
2015-10-15 02:45:03 +00:00
|
|
|
ObjectCache::getMainWANInstance()->set( $mckey,
|
2006-08-29 15:43:34 +00:00
|
|
|
array(
|
|
|
|
|
'timestamp' => wfTimestampNow(),
|
|
|
|
|
'value' => $this->mText
|
|
|
|
|
), $expiry
|
|
|
|
|
);
|
2007-01-09 20:25:28 +00:00
|
|
|
|
2006-08-29 15:43:34 +00:00
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|