本文整理汇总了PHP中ParserOutput::updateCacheExpiry方法的典型用法代码示例。如果您正苦于以下问题:PHP ParserOutput::updateCacheExpiry方法的具体用法?PHP ParserOutput::updateCacheExpiry怎么用?PHP ParserOutput::updateCacheExpiry使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParserOutput
的用法示例。
在下文中一共展示了ParserOutput::updateCacheExpiry方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: disableCache
/**
* Set a flag in the output object indicating that the content is dynamic and
* shouldn't be cached.
*/
function disableCache()
{
wfDebug("Parser output marked as uncacheable.\n");
$this->mOutput->setCacheTime(-1);
// old style, for compatibility
$this->mOutput->updateCacheExpiry(0);
// new style, for consistency
}
示例2: disableCache
/**
* Set a flag in the output object indicating that the content is dynamic and
* shouldn't be cached.
*/
function disableCache()
{
wfDebug("Parser output marked as uncacheable.\n");
if (!$this->mOutput) {
throw new MWException(__METHOD__ . " can only be called when actually parsing something");
}
$this->mOutput->setCacheTime(-1);
// old style, for compatibility
$this->mOutput->updateCacheExpiry(0);
// new style, for consistency
}
示例3: disableCache
/**
* Set a flag in the output object indicating that the content is dynamic and
* shouldn't be cached.
*/
function disableCache()
{
wfDebug("Parser output marked as uncacheable.\n");
if (!$this->mOutput) {
throw new MWException(__METHOD__ . " can only be called when actually parsing something");
}
$this->mOutput->setCacheTime(-1);
// old style, for compatibility
$this->mOutput->updateCacheExpiry(0);
// new style, for consistency
// Wikia change - begin
Wikia\Logger\WikiaLogger::instance()->info(__METHOD__, ['exception' => new Exception()]);
Transaction::setAttribute(Transaction::PARAM_PARSER_CACHE_DISABLED, true);
// Wikia change - end
}