Magento 2静态缓存 [英] Magento 2 static cache
问题描述
当我要更改模板中的某些内容时,我需要刷新静态缓存(pub/static),因为在前端没有看到任何更改,但是此后该文件夹中有一些空文件夹,并且在前端中我有一些错误ReferenceError: require is not defined
,我需要使用此命令c:\xampp\php\php.exe -f d:\projects\localsites\magento2.local\magento\bin\magento -- setup:static-content:deploy
生成静态内容.也许我做错了什么?
When I would change something in template, I need flush static cache(pub/static) because I didn't saw any changes in front end, but after that this folders has some empty folder and in front end I have some error ReferenceError: require is not defined
and I need use this command c:\xampp\php\php.exe -f d:\projects\localsites\magento2.local\magento\bin\magento -- setup:static-content:deploy
to generate static content. Maybe I do something wrong?
推荐答案
When you developing something for magento2 you should enable developer mode and static willn't has cache and will generation all requests.
您可以阅读有关Magento 2 mod的更多信息在此页面上.
这篇关于Magento 2静态缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!