基础篇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鶮鸸鼟鶪鶩鶥齯龌鶤鶡鶟鼆鶛龰麃麁鷛鷘龅鼃鹪鷀鶙鶕龂鶒鶐鶌鶋龰鶊鸧齈

鶆鶅龅龺龷鹁麃鸧麑麐麌齍龅鸘鶂鵾齯鹇黴黻麌齍鵽鶌鵼鵺鶂鵾鵷鵵鼆鵲鵯鼂鼀龅鵫黻鶂鵾鷴鷳鼆鶟鼆鵩鷽齈

鵦鼦鵢鵡黻鵞鵛鵚齓齏齌齊龅龺龷龴鵘齇鼭鶂鷑齈

本书共42小节:

评论 (写第一个评论)