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

Breadcrumb

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

function 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\Session

Code

public function getPersistentCacheContexts() : array;

API Navigation

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