• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/classes/general/taskitem.php
  • Класс: CTaskItem
  • Вызов: CTaskItem::markCacheAsDirty
public function markCacheAsDirty($clearStaticCache = true)
{
	$this->arTaskData           = null;
	$this->arTaskAllowedActions = null;
	$this->arTaskDataEscaped    = null;
	$this->arTaskUserRoles      = null;
	$this->arTaskFiles          = null;
	$this->arTaskTags           = null;
	$this->arTaskDependsOn      = null;
	$this->arTaskFileAttachments = null;

	$id = (int) $this->getId();

	// $this instance may not have obtained via static::getInstance(), so the code above will not take effect on
	// instances that actually have. Therefore, we need to drop each cache item for $this->getId() ALSO
	if($clearStaticCache && is_array(static::$instances))
	{
		foreach(static::$instances as $key => $instance)
		{
			$key = explode('|', $key);
			if(intval($key[0]) == $id && intval($key[1]) == $this->executiveUserId)
			{
				$instance->markCacheAsDirty(false);
			}
		}
	}
}