Drupal - 禁用CSS缓存 [英] Drupal — disable CSS cache

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

问题描述

我正在使用Drupal 6.每次修改CSS文件时,我需要清除缓存以查看更新的结果,这样会浪费我的时间。有没有办法禁用缓存系统?

I am using Drupal 6. Every time I modify the CSS files, I need to clear the cache to see the updated result, which is a waste of my time. Is there any way to disable the cache system?

推荐答案

CSS缓存需要刷新的原因是因为Drupal优化了所有单独的CSS文件从各种模块和主题到一个CSS文件被优化为一个单一的文件。

The reason the CSS cache needs refreshing is because Drupal optimizes all individual CSS files from various modules and themes into one CSS file which is optimized into a single file.

所以这个文件不会重新编译每一个页面加载,这将失去优化的好处Drupal需要知道什么时候CSS文件已经改变才能重新编译。在哪个缓存刷新似乎是理想的时间。要关闭它,而不是完全关闭缓存,您可以简单地:

So that this file is not recompiled every page load, which would loose the benefit of optimization, Drupal needs to know when the CSS file has changed in order to recompile this. At which cache refresh seems like the ideal time. To turn this off - rather than turn off caching completely you can simply:

转到/ admin / settings / performance,其中有一个标有优化CSS文件的字段:

Go to /admin/settings/performance where there is a field labeled "Optimize CSS files":

在进行开发和更改CSS文件时,禁用此功能。那么当在生产和大部分的CSS被设置,那么你可以启用它。我强烈建议您加载页面带来的性能提升。

Disable this whilst you are doing your development and making changes to your CSS file. Then when in production and most of your CSS is set then you can enable it. I highly recommend the performance gains this brings in the loading of your pages.

我已经安装了管理菜单模块,很容易将缓存从这里清空单击一下 - 尝试...

I have the administration menu module installed, and it is very easy to empty the cache from here in a single click - have a try...

这篇关于Drupal - 禁用CSS缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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