core/includes/common.inc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/core/includes/common.inc b/core/includes/common.inc index b1744e05..6c6c4a3 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -1327,6 +1327,16 @@ function drupal_pre_render_styles($elements) { } /** + * Deletes old cached CSS files. + * + * @deprecated in Drupal 8.x, will be removed before Drupal 9.0. + * Use \Drupal\Core\Asset\AssetCollectionOptimizerInterface::deleteAll(). + */ +function drupal_clear_css_cache() { + \Drupal::service('asset.css.collection_optimizer')->deleteAll(); +} + +/** * Prepares a string for use as a CSS identifier (element, class, or ID name). * * http://www.w3.org/TR/CSS21/syndata.html#characters shows the syntax for valid @@ -2440,6 +2450,16 @@ function drupal_attach_tabledrag(&$element, array $options) { } /** + * 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(). + */ +function drupal_clear_js_cache() { + \Drupal::service('asset.js.collection_optimizer')->deleteAll(); +} + +/** * Stores the current page in the cache. * * If page_compression is enabled, a gzipped version of the page is stored in