In Laravel 6, update the contents of the file in the Amazon S3 storage, open the CDN URL, and its contents are analyzed without change
1. The current URL:https://xxx.cloudfastin.com/static/xxx/98a10389-0831-4aa9-9335-3c2c3f46fd7b/assets/css/app.a572190.css, the value of its content is: 6666 . as shown in Figure 1
2. Update the contents of assets/css/app.a572190.css again as: 7777, and find that the content of the URL is unchanged.
3. The code is implemented as follows
return $this->filesystemManager
->disk($this->config->get('theme_asset.filesystem.disk'))
->put(
$path,
$contents,
$this->config->get('theme_asset.filesystem.options')
);
4. Print the $options of the put method, the value is as follows
array(2) {
["ACL"]=>
string(11) "public-read"
["CacheControl"]=>
string(24) "max-age=31536000, public"
}
5. Since the app.a572190.css file is generated after compilation, when the source file of this css file is re-edited, the app.a572191.css file with a new name will be generated, which is for s3 The operation is to make a new file (app.a572191.css), and then delete the old file (app.a572190.css). Therefore, the content of the css file of the same name does not change, which will not affect the page where this css file is used, because the new name of the app.a572191.css file is referenced in the page.
