本文整理汇总了PHP中Wikia::setUpMemcachePurge方法的典型用法代码示例。如果您正苦于以下问题:PHP Wikia::setUpMemcachePurge方法的具体用法?PHP Wikia::setUpMemcachePurge怎么用?PHP Wikia::setUpMemcachePurge使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Wikia
的用法示例。
在下文中一共展示了Wikia::setUpMemcachePurge方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: newrelic_disable_autorum
Transaction::setAttribute(Transaction::PARAM_CONTROLLER, $wgRequest->getVal('controller'));
Transaction::setAttribute(Transaction::PARAM_METHOD, $wgRequest->getVal('method'));
}
if (function_exists('newrelic_disable_autorum')) {
newrelic_disable_autorum();
}
if (!empty($wgEnableNirvanaAPI)) {
// temporarily force ApiDocs extension regardless of config
require_once $IP . "/extensions/wikia/ApiDocs/ApiDocs.setup.php";
// same for JsonFormat
require_once $IP . "/extensions/wikia/JsonFormat/JsonFormat.setup.php";
$app = F::app();
// Ensure that we have a title stub, otherwise parser does not work BugId: 12901
$app->wg->title = Wikia::createTitleFromRequest($app->wg->Request);
// support "mcache" URL parameter to ease debugging
Wikia::setUpMemcachePurge($app->wg->Request, $app->wg->User);
// initialize skin if requested
$app->initSkin((bool) $app->wg->Request->getVal("skin", false));
$response = $app->sendRequest(null, null, null, false);
// commit any open transactions just in case the controller forgot to
$app->commit();
//if cache policy wasn't explicitly set (e.g. WikiaResponse::setCacheValidity)
//then force no cache to reflect api.php default behavior
$cacheControl = $response->getHeader('Cache-Control');
if (empty($cacheControl)) {
$response->setHeader('Cache-Control', 'private', true);
Wikia\Logger\WikiaLogger::instance()->info('wikia-php.caching-disabled', ['controller' => $response->getControllerName(), 'method' => $response->getMethodName()]);
}
$response->sendHeaders();
wfRunHooks('NirvanaAfterRespond', [$app, $response]);
$response->render();