基础篇12. 关闭缓存,检查网站是否出错

龶龴龳龯settings.local.php龋龈龆龂龁67齼齹84齼齲齯齫齪齦齲齣齡齝齚齘齕龂齔齓齐齦齌齉齇齆齂鼿鼾Drupal console齲鼴鼲齌齉鼮鼬鼨鼴鼲齌齉齇(鼡鼟鼝鼜齲鼚鼗龂鼓齲齯齫龆龂鼒鼐鼍鼌齲齼鼋鼈鼅鼁黾黻黹龂黶黵鼚黳鼐黲黱黮)

/**
 * Disable the render cache (this includes the page cache).
 *
 * Note: you should test with the render cache enabled, to ensure the correct
 * cacheability metadata is present. However, in the early stages of
 * development, you may want to disable it.
 *
 * This setting disables the render cache by using the Null cache back-end
 * defined by the development.services.yml file above.
 *
 * Do not use this setting until after the site is installed.
 */
 $settings['cache']['bins']['render'] = 'cache.backend.null';
/**
 * Disable Dynamic Page Cache.
 *
 * Note: you should test with Dynamic Page Cache enabled, to ensure the correct
 * cacheability metadata is present (and hence the expected behavior). However,
 * in the early stages of development, you may want to disable it.
 */
 $settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';

麧麣麡麟龯麛麗麔龂麑麏麌齐龂麊麆麅麄麂鹾麌齐鼅鹺鹸鹶鹴鹲龂鹱鼈鹰鹮龂鼓黱鼐黲鹫龯麌齐鼁鹨鹤黻黹齇

鹡齣鹟龂鹛鹮鹸鹚齲鹙鹘service龂鹖麊 twig debug 齹鹔鼾齌齉龂龶龴鹑鹎鹌鹮local.services.yml龋龈龂

鹈鹇鹅龋龈龆鹃cache鹁鸽鹛false龂麧麣鸻鸷齂鼴鼲鹮齌齉齇鸳鸱龂龶龴鸮龳龯settings.local.php龋龈龆鹲鸪鸻67齼齹84齼齲齯齫龂鹈鸻鸨齂鼴鼲鹮齌齉齇麅鸧齲鸤鸡鸞鸜黵鸙鹶鸕鸑齲齇鼓鸐鸏鸌鸋麅麄鸊鸆鼨鸤鸡龂黱麧鸐麣麑麏麌齐齲麂鹾鸃鸁鷿鷾鷺龂鷸麄鷶鷲鹱鷰鹮齇

鷶鷬鷫麧鼁鸷鷧鷥龋鷢鷟鷛鼾rebuild.php鼈鹰鷙鷘鷗鷕龂黶黵龂龶鷒鷎鷌鷉鷇龂鹅麅麄鷄鷁齹麅麄鼝鼜齲Drupal8龆黵鶾鶼鷙鷘鷗鷕齲齇鷶鷬鶹鶸鶴鶲鶰鶯drupal8鶫鸽鼜鶨鶤鶡齲龋鶟鶜鶚鼁鶖龯麅麄鷗鷕龂黾鹰鶹鶕鶓龁鶑鶏鶌鶊龯鶆鸧齇

鶃鵿龂龶龴鹅麅鸧麑麏麌齐龂鸑鵻鵷齲鹈黱黵麌齐鵴鶌鵱鵭鵻鵷鵪鵩鼁鵦鵢黻黹龂鵞黵鵻鵷鷶鷲鼁鶚鼁鵝鷾齇

鵙鼟鵖鵔黵鵑鵏鵌齔齓齌齉龂龶龴龳鵉齆鼨鵻鷌齇

本书共70小节:

评论 (写第一个评论)