diff --git a/libraries.module b/libraries.module index 059bfea..a103564 100644 --- a/libraries.module +++ b/libraries.module @@ -9,6 +9,13 @@ * Implements hook_flush_caches(). */ function libraries_flush_caches() { + // Clear static caches. + // We don't clear the 'libraries_load' static cache, because that could result + // in libraries that had been loaded before the cache flushing to be loaded + // again afterwards. + foreach (array('libraries_get_path', 'libraries_info') as $name) { + drupal_static_reset($name); + } return array('cache_libraries'); }