AccessResult::setCacheMaxAge

public AccessResult::setCacheMaxAge($max_age)

Sets the maximum age for which this access result may be cached.

Parameters

int $max_age: The maximum time in seconds that this access result may be cached.

Return value

$this

File

core/lib/Drupal/Core/Access/AccessResult.php, line 229

Class

AccessResult
Value object for passing an access result with cacheability metadata.

Namespace

Drupal\Core\Access

Code

public function setCacheMaxAge($max_age) {
  $this->cacheMaxAge = $max_age;
  return $this;
}
doc_Drupal
2016-10-29 08:42:32
Comments
Leave a Comment

Please login to continue.