public function actionClearRemoteImages()
    {
        $config = Plugin::$plugin->getSettings();
        $request = Craft::$app->getRequest();

        $key = $request->getParam('key', '');
        $setKey = $config->clearKey;

        if ($setKey === '' || $key != $setKey) {
            throw new \Exception('Unautorized key');
        }

        Plugin::$plugin->imager->deleteRemoteImageCaches();

        return true;
    }
public function actionClearRemoteImages()
    {
        $config = Plugin::$plugin->getSettings();
        $request = Craft::$app->getRequest();

        $key = $request->getParam('key', '');
        $setKey = $config->clearKey;

        if ($setKey === '' || $key != $setKey) {
            throw new \Exception('Unautorized key');
        }

        Plugin::$plugin->imager->deleteRemoteImageCaches();

        return true;
    }
public function actionClearRemoteImages ( ) { $ config = Plugin :: $ plugin -> getSettings ( ) ; $ request = Craft :: $ app -> getRequest ( ) ; $ key = $ request -> getParam ( 'key' , '' ) ; $ setKey = $ config -> clearKey ; if ( $ setKey === '' || $ key != $ setKey ) { throw new \ Exception ( 'Unautorized key' ) ; } Plugin :: $ plugin -> imager -> deleteRemoteImageCaches ( ) ; return true ; }
Controller action to clear remote images

@throws \yii\base\ErrorException
Controller action to clear remote images