function AccessPolicyInterface::getPersistentCacheContexts
Same name in other branches
- 11.x core/lib/Drupal/Core/Session/AccessPolicyInterface.php \Drupal\Core\Session\AccessPolicyInterface::getPersistentCacheContexts()
Gets the persistent cache contexts.
These inform the system what your access policy's calculations always vary by. If you have any further cache contexts that you want to conditionally add, you can do so in calculatePermissions and alterPermissions.
Return value
string[] The persistent cache contexts.
1 method overrides AccessPolicyInterface::getPersistentCacheContexts()
- AccessPolicyBase::getPersistentCacheContexts in core/
lib/ Drupal/ Core/ Session/ AccessPolicyBase.php - Gets the persistent cache contexts.
File
-
core/
lib/ Drupal/ Core/ Session/ AccessPolicyInterface.php, line 85
Class
- AccessPolicyInterface
- Defines the access policy interface.
Namespace
Drupal\Core\SessionCode
public function getPersistentCacheContexts() : array;
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.