addTag() public method

Adds a tag built from the given key and value.
public addTag ( string $key, string $value ) : void
$key string
$value string
return void
 /**
  * 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);
 }