silex 和 twig css 缓存问题 - 奇怪的行为

silex and twig css cache issues - odd behavior

我 运行 遇到了一个非常令人沮丧的错误。我无法重新加载 css 文件中的更改。

style.css 在 PhpStorm 中看到的样子:

body {
  background-color: blue;
}

还看到Chrome显示:

body {
  background-color: green;
}

这是奇怪的行为:如果我将 style.css 更改为 "foo bar testing"

Chrome 显示为:

body {
  backgrou

而且,如果我将大量任意文本转储到 style.css,Chrome 将其显示为:

body {
  background-color: green;
}
���������������������������������������������������������������...etc

所以Chrome识别是改了,但是还是用原文固定的

我的树枝选项是:

$app['twig.options'] = array('cache' => false, 'auto_reload' => true);

我还尝试将 ?{{ random() }} 附加到 style.css 以强制重新加载,但没有任何乐趣。

原来问题出在带有 VirtualBox 的 运行 Nginx 上。

/etc/nginx/nginx.conf 中需要关闭 sendfile