public function Oauth2Token::getCacheTags in Simple OAuth (OAuth2) & OpenID Connect 8.3
Same name and namespace in other branches
- 8.4 src/Entity/Oauth2Token.php \Drupal\simple_oauth\Entity\Oauth2Token::getCacheTags()
- 5.x src/Entity/Oauth2Token.php \Drupal\simple_oauth\Entity\Oauth2Token::getCacheTags()
The cache tags associated with this object.
When this object is modified, these cache tags will be invalidated.
Return value
string[] A set of cache tags.
Overrides EntityBase::getCacheTags
File
- src/
Entity/ Oauth2Token.php, line 226
Class
- Oauth2Token
- Defines the Oauth2 Token entity.
Namespace
Drupal\simple_oauth\EntityCode
public function getCacheTags() {
// It's feasible there are millions of OAuth2 tokens in rotation; they're
// used only for authentication, not for computing output. Hence it does not
// make sense for an OAuth2 token to be a cacheable dependency. Consequently
// generating a unique cache tag for every OAuth2 token entity should be
// avoided. Therefore a single cache tag is used for all OAuth2 token
// entities, including for lists.
return [
'oauth2_token',
];
}