Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

UnchangingCacheableDependencyTrait.php

Namespace

Drupal\Core\Cache

File

core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php

View source
<?php

namespace Drupal\Core\Cache;


/**
 * Trait to implement CacheableDependencyInterface for unchanging objects.
 *
 * @see \Drupal\Core\Cache\CacheableDependencyInterface
 */
trait UnchangingCacheableDependencyTrait {
    
    /**
     * {@inheritdoc}
     */
    public function getCacheContexts() {
        return [];
    }
    
    /**
     * {@inheritdoc}
     */
    public function getCacheTags() {
        return [];
    }
    
    /**
     * {@inheritdoc}
     */
    public function getCacheMaxAge() {
        return Cache::PERMANENT;
    }

}

Traits

Title Deprecated Summary
UnchangingCacheableDependencyTrait Trait to implement CacheableDependencyInterface for unchanging objects.

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal