Home  >  Article  >  Backend Development  >  How to clear cache of Yii2 assets, clear cache of yii2assets_PHP tutorial

How to clear cache of Yii2 assets, clear cache of yii2assets_PHP tutorial

WBOY
WBOYOriginal
2016-07-12 08:52:021613browse

How to clear the cache of Yii2 assets, clear the cache of yii2assets

The example in this article describes the method of clearing the cache of Yii2 assets. Share it with everyone for your reference, the details are as follows:

use vendor\myVendorName\myPackageName\assets\AppAsset;
AppAsset::register($this);

Add in configuration file:

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

You can clear the cache after refreshing

Readers who are interested in more Yii-related content can check out the special topics on this site: "Introduction to Yii Framework and Summary of Common Techniques", "Summary of Excellent PHP Development Framework", "Basic Tutorial for Getting Started with Smarty Templates", "php Date and Time" Usage Summary", "php object-oriented programming introductory tutorial", "php string (string) usage summary", "php mysql database operation introductory tutorial" and "php common database operation skills summary"

I hope this article will be helpful to everyone’s PHP program design based on the Yii framework.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1127883.htmlTechArticleYii2 assets clear cache method, yii2assets clear cache This article describes the method of clearing cache of Yii2 assets. Share it with everyone for your reference, the details are as follows: use vendormyVend...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn