- /**
- * 2017-06-30
- * «How does `Flush Cache Storage` work?» https://mage2.pro/t/4118
- * @see \Magento\Backend\Controller\Adminhtml\Cache\FlushAll::execute()
- * @param string[] ...$types
- */
- function df_cache_clean(...$types) {
- ($types = df_args($types))
- /** @uses \Magento\Framework\App\Cache\TypeList::cleanType() */
- ? array_map([df_cache_type_list(), 'cleanType'], $types)
- : df_map(function(IFrontend $f) {$f->getBackend()->clean();}, df_cache_pool())
- ;}