カスタムモジュールのレンダリングを非キャッシュ化する方法
OTHER FAQ
| カテゴリ | Core Ver. | 関連モジュール | タイトル | 
|---|---|---|---|
| 言語 | 7.15 | Language | まだ翻訳されていない英語文、どうにかならない? | 
| テーマ | 7.15 | CSS Injector | 簡単にCSSを追加したい | 
| コンテンツの管理 | 6.x | Views Flag Calendar | 空き室予約のような仕組みは実現できますか? | 
| コンテンツの作成 | 6.x | Views | カルーセルのように回転するコンテンツを作りたい | 
| アップデート | 7.15 | Webform Backup_and_Migrate | drupal7.12 -> drupal7.14アップデートメモ | 
| フォーム | 7.15 | Webform | WebformのEntity Translation | 
| フォーム | 7.15 | Webform | Webform - 確認ページの多言語化 | 
| コンテンツの作成 | 7.15 | Automatic_Nodetitles Automatic_Entity_Label | ノード投稿フォームにタイトル入力フォームを表示しない方法 | 
 
                    
コメント
■ クエリに依存させる
パーマリンク Submitted by actbrain on 2017/12/22 16:24.
■ クエリに依存させる
return [
'#theme' => 'テーマ名',
'#cache' => ['contexts' => ['url.query_args']],
'#year' => $year, // など
'#month' => $month, // など
...
];
■ 保持時間=0にする
return [
'#theme' => 'テーマ名',
'#cache' => ['max-age' => 0],
...
];
■ パスに同期させる
パーマリンク Submitted by actbrain on 2017/12/22 16:29.
■ パスに同期させる
return [
'#theme' => 'テーマ名',
'#cache' => ['contexts' => ['url.path']],
'#year' => $year, // など
'#month' => $month, // など
...
];
■ パス&クエリに同期させる
return [
'#theme' => 'テーマ名',
'#cache' => ['contexts' => ['url.path', 'url.query_args']],
'#year' => $year, // など
'#month' => $month, // など
...
];
ページ