You are here

function restful_flush_caches in RESTful 7.2

Implements hook_flush_caches().

File

./restful.cache.inc, line 23
Procedural implementations for cache related features.

Code

function restful_flush_caches() {
  if (!variable_get('restful_clear_on_cc_all', FALSE)) {
    return array();
  }

  // Delete all the cache fragments.

  /* @var \Drupal\restful\RenderCache\Entity\CacheFragmentController $controller */
  $controller = entity_get_controller('cache_fragment');
  $controller
    ->wipe();
  return array(
    RenderCache::CACHE_BIN,
  );
}