function ctools_css_flush_caches in Chaos Tool Suite (ctools) 7
Same name and namespace in other branches
- 6 includes/css.inc \ctools_css_flush_caches()
Delegated implementation of hook_flush_caches()
1 call to ctools_css_flush_caches()
- CToolsCssCache::clear in includes/
css-cache.inc - Expires data from the cache.
File
- includes/
css.inc, line 558 - CSS filtering functions. Contains a disassembler, filter, compressor, and decompressor.
Code
function ctools_css_flush_caches() {
// Remove all generated files.
// @see http://drupal.org/node/573292
// file_unmanaged_delete_recursive('public://render');
$filedir = file_default_scheme() . '://ctools/css';
if (drupal_realpath($filedir) && file_exists($filedir)) {
// We use the @ because it's possible that files created by the webserver
// cannot be deleted while using drush to clear the cache. We don't really
// care that much about that, to be honest, so we use the @ to suppress
// the error message.
@file_unmanaged_delete_recursive($filedir);
}
db_delete('ctools_css_cache')
->execute();
}