You are here

public function BackgroundImageManager::cacheFlush in Background Image 8

Same name and namespace in other branches
  1. 2.x src/BackgroundImageManager.php \Drupal\background_image\BackgroundImageManager::cacheFlush()
  2. 2.0.x src/BackgroundImageManager.php \Drupal\background_image\BackgroundImageManager::cacheFlush()

Flushes the cache.

Overrides BackgroundImageManagerInterface::cacheFlush

File

src/BackgroundImageManager.php, line 213

Class

BackgroundImageManager

Namespace

Drupal\background_image

Code

public function cacheFlush() {
  file_scan_directory('public://background_image/css', '/.*/', [
    'callback' => function ($uri) {
      @file_unmanaged_delete_recursive($uri);
    },
  ]);
}