You are here

function restful_clear_caches in RESTful 7.2

Clears all caches and associated fragments.

1 string reference to 'restful_clear_caches'
restful_admin_cache_settings in ./restful.cache.inc
Menu callback; Admin settings form.

File

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

Code

function restful_clear_caches() {

  /* @var \Drupal\restful\RenderCache\Entity\CacheFragmentController $controller */
  $controller = entity_get_controller('cache_fragment');
  $controller
    ->wipe();
  cache_clear_all('*', RenderCache::CACHE_BIN, TRUE);
  drupal_set_message(t('RESTful caches were successfully cleared.'));
}