E
E
evilelf2015-09-07 15:05:13
Yii
evilelf, 2015-09-07 15:05:13

Who solves the problem with assets in yii?

Hello!
There is a constant problem with the fact that the data in the assets files (modules) changes, but does not change in the root assets. You have to manually drop the folder or drop the entire cache. Oh, it's not convenient.
Who solves such a problem?
Thanks everyone for the replies/advice.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Makarov, 2015-09-07
@evilelf

'components' => [
    'assetManager' => [
        'linkAssets' => true,
    ]
]

E
evilelf, 2015-09-07
@evilelf

Personally, I made a function into which the module alias is passed and

$path = Yii::getPathOfAlias($alias);
$assets = Yii::app()->getAssetManager()->publish($path. '/assets', false, -1);
rmdir($assets);

But I think it's a bike

X
x88, 2015-09-07
@x88

I abandoned assets in general, in a loaded production, their generation is too expensive.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question