Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
project
drupal
Merge requests
!11701
Resolve
#2453835
"Allow non intrinsic implementation dependent"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Resolve
#2453835
"Allow non intrinsic implementation dependent"
issue/drupal-2453835:2453835-allow-non-intrinsic-implementation-dependent
into
11.x
Overview
1
Commits
4
Pipelines
3
Changes
6
Open
Sascha Grossenbacher
requested to merge
issue/drupal-2453835:2453835-allow-non-intrinsic-implementation-dependent
into
11.x
2 weeks ago
Overview
1
Commits
4
Pipelines
3
Changes
6
Expand
Closes
#2453835
0
0
Merge request reports
Compare
11.x
version 2
e1ae8b02
2 weeks ago
version 1
5cc8e79d
2 weeks ago
11.x (HEAD)
and
latest version
latest version
ef908a36
4 commits,
1 week ago
version 2
e1ae8b02
3 commits,
2 weeks ago
version 1
5cc8e79d
2 commits,
2 weeks ago
6 files
+
255
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
6
Search (e.g. *.vue) (Ctrl+P)
core/lib/Drupal/Core/Cache/Context/CacheContextOptimizableInterface.php
0 → 100644
+
39
−
0
Options
<?php
namespace
Drupal\Core\Cache\Context
;
/**
* Allows cache contexts to influence how cache contexts are optimized.
*/
interface
CacheContextOptimizableInterface
{
/**
* Returns whether a cache context value has variations.
*
* For example, the timezone cache context can define itself as global
* if a site does not have configurable timezones and the language contexts
* are global on a site that is not multilingual.
*
* @return bool
* TRUE if the context has more than one possible variations.
*/
public
function
hasVariations
():
bool
;
/**
* Returns parent contexts for this context.
*
* By default, parents are derived based on the cache context name, user is
* a parent of user.permissions. This allows e.g. the user.roles context to
* expand on this and indicate that user.permissions is also a valid
* parent/replacement.
*
* Note that if implementing this, it is necessary to also include parents of
* the parent contexts, e.g. user.roles must provide both user.permissions and
* user.
*
* @return array
* A list of parents cache contexts.
*/
public
function
getParentContexts
():
array
;
}
Loading