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

Breadcrumb

  1. Drupal Core 11.1.x
  2. Time.php

function Time::cacheSetMaxAge

Overrides CachePluginBase::cacheSetMaxAge

1 call to Time::cacheSetMaxAge()
Time::getDefaultCacheMaxAge in core/modules/views/src/Plugin/views/cache/Time.php
Returns the default cache max age.

File

core/modules/views/src/Plugin/views/cache/Time.php, line 162

Class

Time
Simple caching of query results for Views displays.

Namespace

Drupal\views\Plugin\views\cache

Code

protected function cacheSetMaxAge($type) {
    $lifespan = $this->getLifespan($type);
    if ($lifespan) {
        return $lifespan;
    }
    else {
        return Cache::PERMANENT;
    }
}

API Navigation

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