You are here

public function Serializer::getCacheMaxAge in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/rest/src/Plugin/views/style/Serializer.php \Drupal\rest\Plugin\views\style\Serializer::getCacheMaxAge()
  2. 9 core/modules/rest/src/Plugin/views/style/Serializer.php \Drupal\rest\Plugin\views\style\Serializer::getCacheMaxAge()

The maximum age for which this object may be cached.

Return value

int The maximum time in seconds that this object may be cached.

Overrides CacheableDependencyInterface::getCacheMaxAge

File

core/modules/rest/src/Plugin/views/style/Serializer.php, line 161

Class

Serializer
The style plugin for serialized output formats.

Namespace

Drupal\rest\Plugin\views\style

Code

public function getCacheMaxAge() {
  return Cache::PERMANENT;
}