drupal_clear_js_cache

drupal_clear_js_cache()

Deletes old cached JavaScript files and variables.

Deprecated

in Drupal 8.x, will be removed before Drupal 9.0. Use \Drupal\Core\Asset\AssetCollectionOptimizerInterface::deleteAll().

File

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

Code

function drupal_clear_js_cache() {
  \Drupal::service('asset.js.collection_optimizer')->deleteAll();
}
doc_Drupal
2016-10-29 09:03:11
Comments
Leave a Comment

Please login to continue.