Skip to content

Commit a330e39

Browse files
committed
Add a cache clear option for plugin cache.
1 parent 40b149e commit a330e39

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Commands/core/CacheCommands.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ public function getTypes($include_bootstrapped_types = false)
250250
'router' => [$this, 'clearRouter'],
251251
'css-js' => [$this, 'clearCssJs'],
252252
'render' => [$this, 'clearRender'],
253+
'plugin' => [$this, 'clearPlugin'],
253254
];
254255
}
255256

@@ -297,6 +298,11 @@ public static function clearRender()
297298
Cache::invalidateTags(['rendered']);
298299
}
299300

301+
public static function clearPlugin()
302+
{
303+
\Drupal::getContainer()->get('plugin.cache_clearer')->clearCachedDefinitions();
304+
}
305+
300306
/**
301307
* Loads the Drupal autoloader and returns the instance.
302308
*/

0 commit comments

Comments
 (0)