<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # 頁面緩存 頁面緩存指的是在服務器端緩存整個頁面的內容。隨后當同一個頁面被請求時,內容將從緩存中取出,而不是重新生成。 頁面緩存由 yii\filters\PageCache 類提供支持,該類是一個[過濾器](http://www.yiichina.com/doc/guide/2.0/structure-filters)。它可以像這樣在控制器類中使用: ~~~ public function behaviors() { return [ [ 'class' => 'yii\filters\PageCache', 'only' => ['index'], 'duration' => 60, 'variations' => [ \Yii::$app->language, ], 'dependency' => [ 'class' => 'yii\caching\DbDependency', 'sql' => 'SELECT COUNT(*) FROM post', ], ], ]; } ~~~ 上述代碼表示頁面緩存只在?`index`?操作時啟用,頁面內容最多被緩存 60 秒,會隨著當前應用的語言更改而變化。如果文章總數發生變化則緩存的頁面會失效。 如你所見,頁面緩存和[片段緩存](http://www.yiichina.com/doc/guide/2.0/caching-fragment)極其相似。它們都支持?`duration`,`dependencies`,`variations`?和?`enabled`?配置選項。它們的主要區別是頁面緩存是由[過濾器](http://www.yiichina.com/doc/guide/2.0/structure-filters)實現,而片段緩存則是一個[小部件](http://www.yiichina.com/doc/guide/2.0/structure-widgets)。 你可以在使用頁面緩存的同時,使用[片段緩存](http://www.yiichina.com/doc/guide/2.0/caching-fragment)和[動態內容](http://www.yiichina.com/doc/guide/2.0/caching-fragment#dynamic-content)。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看