You are here

public static function ApiProductEntityAccessCacheReset::getSubscribedEvents in Apigee Edge 8

File

src/EventSubscriber/ApiProductEntityAccessCacheReset.php, line 57

Class

ApiProductEntityAccessCacheReset
Ensures that entity access cache gets cleared on API product entities.

Namespace

Drupal\apigee_edge\EventSubscriber

Code

public static function getSubscribedEvents() {
  return [
    // Reset API product access when a app credentials gets
    // updated because having an app with a product grants access
    // to the product.
    // @see _apigee_edge_user_has_an_app_with_product()
    AppCredentialCreateEvent::EVENT_NAME => 'clearApiProductCache',
    AppCredentialGenerateEvent::EVENT_NAME => 'clearApiProductCache',
    AppCredentialDeleteEvent::EVENT_NAME => 'clearApiProductCache',
    AppCredentialAddApiProductEvent::EVENT_NAME => 'clearApiProductCache',
    AppCredentialDeleteApiProductEvent::EVENT_NAME => 'clearApiProductCache',
  ];
}