A
A
Alexander Nevsky2019-06-25 15:39:31
Yii
Alexander Nevsky, 2019-06-25 15:39:31

How to clear assets?

I got tired of fighting the cache in the configs, sort of like turning everything off, but it was still cached.
I deleted all the insides of the frontend/web/assets folder and now I don't know how to update the module paths.
That is, the modules from the vendor folder also shoved all the js and css into assets, the main Assets files (frontend/assets) were restored, and vendor didn’t.
5d12153471e8e272483653.png
How to restore them and how to work with the cache correctly?
assetManager in frontend/config/main.php

'assetManager' => [
            'linkAssets' => true,
    		'forceCopy' => true,
      'bundles' => [
        'yii\web\JqueryAsset' => [
          'js'=>[]
        ],
        'yii\bootstrap\BootstrapPluginAsset' => [
          'js'=>[]
        ],
        'yii\bootstrap\BootstrapAsset' => [
          'css' => [],
        ],
      ],
    ],

In the same place I disable cache and session
$config = [
...
];
    unset($config['components']['cache']);
    unset($config['components']['session']);

return $config;

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question