function drupal_clear_js_cache

Deletes old cached JavaScript files and variables.

1 call to drupal_clear_js_cache()
1 string reference to 'drupal_clear_js_cache'

File

drupal/core/includes/common.inc, line 4683
Common functions that many Drupal modules will need to reference.

Code

function drupal_clear_js_cache() {
  state()
    ->delete('system.javascript_parsed');
  state()
    ->delete('system.js_cache_files');
  file_scan_directory('public://js', '/.*/', array(
    'callback' => 'drupal_delete_file_if_stale',
  ));
}