Verified Commit ab4a2c7e authored by quietone's avatar quietone
Browse files

Issue #3480732 by debrup, joachim, gaurav gupta: Correct docs for CachePluginBase::cacheSetMaxAge()

(cherry picked from commit 4f04d687)
parent 46b3dc33
Loading
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -46887,12 +46887,6 @@
	'count' => 1,
	'path' => __DIR__ . '/modules/views/src/Plugin/views/cache/CachePluginBase.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\CachePluginBase\\:\\:cacheSetMaxAge\\(\\) has no return type specified\\.$#',
	'count' => 1,
	'path' => __DIR__ . '/modules/views/src/Plugin/views/cache/CachePluginBase.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\CachePluginBase\\:\\:getDefaultCacheMaxAge\\(\\) has no return type specified\\.$#',
@@ -46953,12 +46947,6 @@
	'count' => 1,
	'path' => __DIR__ . '/modules/views/src/Plugin/views/cache/Time.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\Time\\:\\:cacheSetMaxAge\\(\\) has no return type specified\\.$#',
	'count' => 1,
	'path' => __DIR__ . '/modules/views/src/Plugin/views/cache/Time.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\views\\\\Plugin\\\\views\\\\cache\\\\Time\\:\\:getDefaultCacheMaxAge\\(\\) has no return type specified\\.$#',
+7 −4
Original line number Diff line number Diff line
@@ -82,14 +82,17 @@ protected function cacheExpire($type) {
  }

  /**
   * Determine cache expiration time.
   * Determines cache expiration time based on its type.
   *
   * Plugins must override this to implement expiration in the cache table. The
   * default is CACHE_PERMANENT, indicating that the item will not be removed
   * automatically from cache.
   * Plugins must override this to implement expiration in the cache table.
   *
   * @param string $type
   *   The cache type.
   *
   * @return int
   *   Either an offset from the request time to indicate when the cache
   *   expires, or \Drupal\Core\Cache\Cache::PERMANENT to indicate that the
   *   cache does not expire. Defaults to \Drupal\Core\Cache\Cache::PERMANENT.
   */
  protected function cacheSetMaxAge($type) {
    return Cache::PERMANENT;