• <bdo id='0IGQZ'></bdo><ul id='0IGQZ'></ul>
    <tfoot id='0IGQZ'></tfoot>

    <legend id='0IGQZ'><style id='0IGQZ'><dir id='0IGQZ'><q id='0IGQZ'></q></dir></style></legend>

      <small id='0IGQZ'></small><noframes id='0IGQZ'>

      1. <i id='0IGQZ'><tr id='0IGQZ'><dt id='0IGQZ'><q id='0IGQZ'><span id='0IGQZ'><b id='0IGQZ'><form id='0IGQZ'><ins id='0IGQZ'></ins><ul id='0IGQZ'></ul><sub id='0IGQZ'></sub></form><legend id='0IGQZ'></legend><bdo id='0IGQZ'><pre id='0IGQZ'><center id='0IGQZ'></center></pre></bdo></b><th id='0IGQZ'></th></span></q></dt></tr></i><div id='0IGQZ'><tfoot id='0IGQZ'></tfoot><dl id='0IGQZ'><fieldset id='0IGQZ'></fieldset></dl></div>

        开发中的 Laravel 和视图缓存 - 无法立即看到更改

        时间:2023-10-31
            <bdo id='Gowiy'></bdo><ul id='Gowiy'></ul>

            1. <tfoot id='Gowiy'></tfoot>

                  <tbody id='Gowiy'></tbody>
                <legend id='Gowiy'><style id='Gowiy'><dir id='Gowiy'><q id='Gowiy'></q></dir></style></legend>

                <small id='Gowiy'></small><noframes id='Gowiy'>

                • <i id='Gowiy'><tr id='Gowiy'><dt id='Gowiy'><q id='Gowiy'><span id='Gowiy'><b id='Gowiy'><form id='Gowiy'><ins id='Gowiy'></ins><ul id='Gowiy'></ul><sub id='Gowiy'></sub></form><legend id='Gowiy'></legend><bdo id='Gowiy'><pre id='Gowiy'><center id='Gowiy'></center></pre></bdo></b><th id='Gowiy'></th></span></q></dt></tr></i><div id='Gowiy'><tfoot id='Gowiy'></tfoot><dl id='Gowiy'><fieldset id='Gowiy'></fieldset></dl></div>
                • 本文介绍了开发中的 Laravel 和视图缓存 - 无法立即看到更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我和一些朋友决定开始一个项目,我们遇到了 Laravel,并认为它可能是一个很好的工具.我们开始在本地使用它来开发我们的一些页面,并发现了一些奇怪的东西.

                  Some friends and I decided to start working on a project and we came across Laravel and thought it might be a good tool. We started using it locally to develop out some of our pages and noticed something strange.

                  当我们使用不同的信息更新视图时,视图信息会发生变化大约需要 5 到 10 分钟.就像 Laravel 正在缓存视图并在其上放置 TTL.

                  When we update a view with different information, it would take almost 5 to 10 minutes before the views information would change. It's like Laravel is caching the view and put a TTL on it.

                  我知道这不是我在本地 Web 服务器上做的任何事情,因为我使用过其他框架并且从未遇到过这个问题.

                  I know this isn't anything I am doing on my local web server because I have used other frameworks and I have never encountered this issue.

                  在互联网上搜索时,我找不到有关如何禁用此功能的好答案.我想使用 Laravel,但如果每次我想要进行更改时我的视图都需要一段时间来更新,我会发现它毫无价值.事实上,这听起来适得其反.

                  Upon searching the Internet, I can't find a great answer on how to disable this. I want to use Laravel, but find it worthless if it takes a while for my views to update each time I want to make a change. In fact, it sounds counter productive.

                  有什么方法可以禁用它吗?为什么开箱即用我的视图需要永远更新?

                  Is there any way to disable this? Why are my views taking forever to update right out of the box?

                  推荐答案

                  #laravel IRC 频道是上帝派来的.这与 Laravel 的行为完全无关.这实际上是 PHP 5.5 正在做的事情.

                  The #laravel IRC channel is a God send. This had nothing to do with Laravel's behavior at all. This was actually something PHP 5.5 was doing.

                  之所以如此莫名其妙,是因为我从 5.3 升级了我的 PHP 版本,从未遇到过这个问题.

                  The reason this was so baffling is because I upgraded my PHP version from 5.3 and never had this issue.

                  在您的 .ini 文件中,您需要调整 OPcache 设置.对我来说,这些设置从 .ini 文件的第 1087 行开始,看起来像这样:

                  In your .ini file, you need to tweak your OPcache settings. For me, these settings began at line 1087 in the .ini file and looked something like this:

                  opcache.memory_consumption=128
                  opcache.interned_strings_buffer=8
                  opcache.max_accelerated_files=4000
                  opcache.revalidate_freq=60
                  opcache.fast_shutdown=1
                  opcache.enable_cli=1
                  

                  请特别注意 opcache.revalidate_freq=60.这实际上是使您的视图缓存的原因.如果这不是所需的行为,请将值设置为 0,您的视图将在您每次进行更改时更新.耶!

                  Take particular note of the opcache.revalidate_freq=60. This is what is actually making your views cache. If this is not the desired behavior, set the value to 0 and your views will update every time you make a change. Yay!

                  2014 年 8 月 21 日编辑

                  如下面的 Matt 所述,请确保在更改 .ini 文件后重新启动您的网络服务器以查看更改生效.

                  As mentioned by Matt below, make sure to restart your web server to see your changes take effect after you have changed your .ini file.

                  这篇关于开发中的 Laravel 和视图缓存 - 无法立即看到更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Eloquent 模型海量更新 下一篇:作曲家在每个项目上都内存不足,Mac OS X

                  相关文章

                  <small id='Fx9AR'></small><noframes id='Fx9AR'>

                    1. <tfoot id='Fx9AR'></tfoot>
                        <bdo id='Fx9AR'></bdo><ul id='Fx9AR'></ul>
                    2. <i id='Fx9AR'><tr id='Fx9AR'><dt id='Fx9AR'><q id='Fx9AR'><span id='Fx9AR'><b id='Fx9AR'><form id='Fx9AR'><ins id='Fx9AR'></ins><ul id='Fx9AR'></ul><sub id='Fx9AR'></sub></form><legend id='Fx9AR'></legend><bdo id='Fx9AR'><pre id='Fx9AR'><center id='Fx9AR'></center></pre></bdo></b><th id='Fx9AR'></th></span></q></dt></tr></i><div id='Fx9AR'><tfoot id='Fx9AR'></tfoot><dl id='Fx9AR'><fieldset id='Fx9AR'></fieldset></dl></div>
                      <legend id='Fx9AR'><style id='Fx9AR'><dir id='Fx9AR'><q id='Fx9AR'></q></dir></style></legend>