You are here

public function CampaignMonitorManager::clearCache in Campaign Monitor 8.2

Clears all the caches used by this wrapper object.

1 call to CampaignMonitorManager::clearCache()
CampaignMonitorManager::createList in src/CampaignMonitorManager.php
Create a new list at the Campaign Monitor servers.

File

src/CampaignMonitorManager.php, line 1073

Class

CampaignMonitorManager
Manager for Campaignmonitor.

Namespace

Drupal\campaignmonitor

Code

public function clearCache() {
  $caches = [
    'cache.config',
    'cache.data',
  ];

  // Flush entity and render persistent caches.
  $this->moduleHandler
    ->invokeAll('cache_flush');
  foreach (Cache::getBins() as $cache_backend) {
    if (in_array($cache_backend->_serviceId, $caches)) {
      $cache_backend
        ->deleteAll();
    }
  }
}