public function addTag($key, $value)
{
$key = trim($key);
if ($key === '') {
throw new Exception('Tag Key must not be empty', 1448264366);
}
$value = trim($value);
if ($value === '') {
throw new Exception('Tag Value must not be empty', 1448264367);
}
$tag = Functions::ucfirst($key) . 'DynamicTag_' . $value;
$this->tags[$tag] = true;
}
/** * Add a tag to the current cache segment * * During TS rendering the method can be used to add tag dynamicaly for the current cache segment. * * @param string $key * @param string $value * @return void * @api */ public function addCacheTag($key, $value) { if ($this->runtimeContentCache->getEnableContentCache() === false) { return; } $this->runtimeContentCache->addTag($key, $value); }