You are here

function imagecache_external_flush_cache in Imagecache External 8

Same name and namespace in other branches
  1. 7.2 imagecache_external.module \imagecache_external_flush_cache()

Helper function to flush caches.

Return value

bool A Boolean value to indicate that the operation succeeded.

2 calls to imagecache_external_flush_cache()
FlushExternalImages::submitForm in src/Form/FlushExternalImages.php
Form submission handler.
imagecache_external_cron in ./imagecache_external.module
Implements hook_cron().

File

./imagecache_external.module, line 348
Allows the usage of Image Styles on external images.

Code

function imagecache_external_flush_cache() {
  $path = imagecache_external_get_directory_path();
  if (is_dir($path)) {
    if (imagecache_external_batch_flush($path)) {
      \Drupal::logger('imagecache_external')
        ->notice('Imagecache caches have been flushed');
      return TRUE;
    }
    else {
      return FALSE;
    }
  }
}