久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

開發中的 Laravel 和視圖緩存——無法立即看到變

Laravel and view caching in development -- can#39;t see changes right away(開發中的 Laravel 和視圖緩存——無法立即看到變化)
本文介紹了開發中的 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.

在 Internet 上搜索后,我找不到有關如何禁用此功能的最佳答案.我想使用 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 和視圖緩存——無法立即看到變化的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Joining 2 tables in SELECT(MYSQL/PHP)(在 SELECT(MYSQL/PHP) 中加入 2 個表)
How to make lt;option selected=quot;selectedquot;gt; set by MySQL and PHP?(如何使lt;option selected=“selectedgt;由 MySQL 和 PHP 設置?)
Auto populate a select box using an array in PHP(使用 PHP 中的數組自動填充選擇框)
PHP SQL SELECT where like search item with multiple words(PHP SQL SELECT where like search item with multiple words)
json_encode produce JSON_ERROR_UTF8 from MSSQL-SELECT(json_encode 從 MSSQL-SELECT 產生 JSON_ERROR_UTF8)
MySQL ORDER BY rand(), name ASC(MySQL ORDER BY rand(),名稱 ASC)
主站蜘蛛池模板: 羞羞的视频免费在线观看 | 91精品国产91久久综合桃花 | 亚洲一区视频在线 | 久久精品 | 日本精品裸体写真集在线观看 | 亚洲成人精品视频 | 成人精品鲁一区一区二区 | 亚洲精品成人av | 一区二区三区国产 | 久久精品青青大伊人av | 人干人操| 在线观看国产www | 久久精品中文字幕 | 日本不卡免费新一二三区 | 最新日韩精品 | 国产精品久久久久久久久久久久久 | 综合久久综合久久 | 国产999精品久久久久久 | 精品国产乱码久久久久久果冻传媒 | 丝袜一区二区三区 | 久久久www成人免费无遮挡大片 | 自拍偷拍在线视频 | 91一区二区| 日韩精品一区二区三区久久 | 日本一本视频 | 日韩视频―中文字幕 | 中文字幕在线视频观看 | 日本欧美黄色片 | 国产高清在线 | 午夜天堂精品久久久久 | 在线观看国产视频 | 欧美天堂在线观看 | 中文字幕国产在线 | 国产精品久久久亚洲 | 中文字幕不卡在线观看 | 亚洲精品一区在线 | 久久亚洲一区二区三区四区 | 99精品网| 亚洲一区二区视频 | 欧美精品99| 国产高清视频一区 |