Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3424701
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3424701
Commits
ab4a2c7e
Verified
Commit
ab4a2c7e
authored
3 months ago
by
quietone
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3480732
by debrup, joachim, gaurav gupta: Correct docs for CachePluginBase::cacheSetMaxAge()
(cherry picked from commit
4f04d687
)
parent
46b3dc33
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/.phpstan-baseline.php
+0
-12
0 additions, 12 deletions
core/.phpstan-baseline.php
core/modules/views/src/Plugin/views/cache/CachePluginBase.php
+7
-4
7 additions, 4 deletions
.../modules/views/src/Plugin/views/cache/CachePluginBase.php
with
7 additions
and
16 deletions
core/.phpstan-baseline.php
+
0
−
12
View file @
ab4a2c7e
...
...
@@ -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\\.$#',
This diff is collapsed.
Click to expand it.
core/modules/views/src/Plugin/views/cache/CachePluginBase.php
+
7
−
4
View file @
ab4a2c7e
...
...
@@ -82,14 +82,17 @@ protected function cacheExpire($type) {
}
/**
* Determine cache expiration time.
* Determine
s
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment