本文整理汇总了PHP中Pimcore\Cache::clearTags方法的典型用法代码示例。如果您正苦于以下问题:PHP Cache::clearTags方法的具体用法?PHP Cache::clearTags怎么用?PHP Cache::clearTags使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pimcore\Cache
的用法示例。
在下文中一共展示了Cache::clearTags方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
protected function execute(InputInterface $input, OutputInterface $output)
{
if ($input->getOption("tags")) {
$tags = explode(",", $input->getOption("tags"));
Cache::clearTags($tags);
} elseif ($input->getOption("output")) {
Cache::clearTag("output");
} else {
Cache::clearAll();
}
}
示例2: resetValidTableColumnsCache
/** Clears the column information for the given table.
* @param $table
*/
protected function resetValidTableColumnsCache($table)
{
$cacheKey = self::CACHEKEY . $table;
\Zend_Registry::getInstance()->offsetUnset($cacheKey);
Cache::clearTags(array("system", "resource"));
}
示例3: clearDependentCache
/**
* @param array $additionalTags
*/
public function clearDependentCache($additionalTags = [])
{
try {
$tags = ["object_" . $this->getId(), "object_properties", "output"];
$tags = array_merge($tags, $additionalTags);
Cache::clearTags($tags);
} catch (\Exception $e) {
\Logger::crit($e);
}
}
示例4: clearDependentCache
/**
* @return void
*/
public static function clearDependentCache()
{
\Pimcore\Cache::clearTags(["translator", "translate"]);
}
示例5: delete
/**
* @return void
*/
public function delete()
{
$this->getDao()->delete();
// clear cache tags
Cache::clearTags(array("tagmanagement", "output"));
}
示例6: clearOutputCacheAction
public function clearOutputCacheAction()
{
$this->checkPermission("clear_cache");
// remove "output" out of the ignored tags, if a cache lifetime is specified
Cache::removeIgnoredTagOnClear("output");
// empty document cache
Cache::clearTags(["output", "output_lifetime"]);
\Pimcore::getEventManager()->trigger("system.cache.clearOutputCache", $this);
$this->_helper->json(["success" => true]);
}
示例7: delete
/**
* @return void
*/
public function delete()
{
if (is_file($this->getConfigFile())) {
unlink($this->getConfigFile());
}
// clear cache tags
Cache::clearTags(array("tagmanagement", "output"));
}
示例8: cleanupAction
public function cleanupAction()
{
$listClass = "\\Pimcore\\Model\\Translation\\" . ucfirst($this->getParam("type")) . "\\Listing";
if (Tool::classExists($listClass)) {
$list = new $listClass();
$list->cleanup();
\Pimcore\Cache::clearTags(array("translator", "translate"));
$this->_helper->json(array("success" => true));
}
$this->_helper->json(array("success" => false));
}
示例9: clearDependentCache
/**
* @param array $additionalTags
*/
public function clearDependentCache($additionalTags = array())
{
try {
$tags = array("document_" . $this->getId(), "document_properties", "output");
$tags = array_merge($tags, $additionalTags);
\Pimcore\Cache::clearTags($tags);
} catch (\Exception $e) {
\Logger::crit($e);
}
}