Magento 2静态缓存 [英] Magento 2 static cache

查看:278
本文介绍了Magento 2静态缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我要更改模板中的某些内容时,我需要刷新静态缓存(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?

推荐答案

为magento2开发内容时,应启用

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆