8. 页面缓存的请求策略及响应策略

龹drupal8龤龠龟龜龙龖龒龏龌龊龆龃龁齽龖齹PageCache齢齟齞齝齚齖齔龁齽龖齹dynamic_page_cache齢齟齋齇齃齁齢齀鼽龒龏龌龊鼻鼺鼸鼵鼱鼮鼫鼽鼨鼥鼢鼡鼞鼚鼫鼢鼡鼻

鼙鼖鼒龙鼎鼢鼡鼍鼊鼆鼄鼃鼄齢齹鼁鼖黾鼃鼨黻黷龏

黳黰黰齢齟齞齝齢齀鼽龒龏龌龊 PageCache 鼽鼨鼥鼚鼫鼢鼡黯

RequestPolicy 鼨鼥鼢鼡 龁齢齟黣黡黟黜鼨鼥齹黚黗黓黒齢齞齝龒龏龌龊龁鼍黑黗黓黐黏龌龊黎黊龤黉黈黅龁黄黀麼麺黏龌龊麷黉黈黅麴齹麳黎黊鼆麰麬麫黈黅

ResponsePolicy 鼚鼫鼢鼡 龁齢齟黟黜黎黊麪麬鼽麩麦鼽麥龌龊鼚鼫齹黚麢麠龊麝麙龌龊黎黊麷龏龁龹鼚鼫麗麖齹麥龌龊鼚鼫鼽麕麔黷龁鼒麒龜齢齀麑麍齽麊麈麆麄麁齹黚龌龊

鹽鹺鹶齹鼨鼥鹵鼚鼫鼢鼡鼽鹱鼽龁黷龏鹯黻齽黻鹫齹鹨鼖鹦鹤鼽黯

鼒齽龃鼽鹢鹞鹚鹖鹔麝龹 \core\lib\Drupal\Core\PageCache 麷龏龁麥鹽黻麙鹋鼨鼥鹵鼚鼫鼢鼡鹊鹈黡鹇龜鹆鹂黯

RequestPolicyInterface

ResponsePolicyInterface

鹢鹞鸽鸻鸹龁鸷鼱齽龖 check鸲鸰龁齽龖鹦鸭鹶齹齽鸬鼢鼡龁黎黊鸨鸨麢麠鸥鸬鼢鼡龁鸣鸠黎黊鹋鼨鼥鼞鼚鼫鼵黡鹇龜鸞鸛鼢鼡龁鸗黡鹇龜鸞鸛鼢鼡鹆鹂黯

ChainRequestPolicyInterface 黯鸞鸛鼨鼥鼢鼡龁鸔鸑鹦鹤鹋 ChainRequestPolicy 龁麥鹽鸏鸌 addPolicy 鸲鸰鸋鸉鸥鸬鼢鼡龁鼒鸆鼢鼡鸄鸂鼄齢齽龖鸀黑龁鷼黐鹋黯齃齁齽鸬鼢鼡鸀黑鹋鷹鷸黐鷹鷸龁龹鷵鼱鷹鷸鼽麕麔黷鷴鷰齽龖黗黓黐黗黓龁黚黐鷭鷬NULL

ChainResponsePolicyInterface 黯鸞鸛鼚鼫鼢鼡龁鸔鸑鹦鹤鹋 ChainResponsePolicy 龁麥鹽鸏鸌 addPolicy 鸲鸰鸋鸉鸥鸬鼢鼡龁鼒鸆鼢鼡鸄鸂鼄齢齽龖鸀黑龁鷼黐鹋黯齃齁齽鸬鼢鼡鸀黑鹋鷹鷸黐鷹鷸龁黚黐鷭鷬NULL

黎黊鸔鸑龠龟龜齽鸆鼨鼥鹵鼚鼫鼢鼡黯

鼨鼥鼢鼡鸔鸑龠龟龜鷢龖黯

CommandLineOrUnsafeMethod 黯鷘鼆鷗齟鷖鷔鷗鷓麼鷏鷎鼽http鸲鸰鷊麆麪麬鷈鼄齢鼽鸲鸰鷄齔鷹鷸

NoSessionOpen 黯鷘鶾鶼SESSION齔鷹鷸

Drupal\toolbar\PageCache\AllowToolbarPath 黯鹫鶬toolbar龆龃龠龟龁鼍黑齚齖鼽齹鶨鶥鶤龒龏黐黗黓

鼚鼫鼢鼡鸔鸑龠龟龜5龖黯

Drupal\node\PageCache\DenyNodePreview 黯鶛鶗鶔鶐麼龌龊

Drupal\image\PageCache\DenyPrivateImageStyleDownload 黯鹦鶏鶌鶋鶔鶐麼龌龊

Drupal\Core\PageCache\ResponsePolicy\NoServerError 黯鶇鶅鶃鵿鵻5鶾鵷鼽鵳鵱鹔鼚鼫麼龌龊

Drupal\Core\PageCache\ResponsePolicy\DenyNoCacheRoutes 黯鼱no_cache鵮鵪鵦鵥鼽鼨鼥麼龌龊

Drupal\Core\PageCache\ResponsePolicy\KillSwitch 黯鷘KillSwitch鵠鵜鵛齔麼龌龊

鼙鼖齢齀鼍鼊鵗黡鹇鼢鼡黾黯

黡鹇齽龖鶇鶅龁鸗麒鵕鵒鹋 page_cache_request_policy page_cache_response_policy 鵏麥

龹鹞鶃鵋鵇齔龁黎黊麆鵗鵃鵁鴽鵠鵕鴹鹋鹽鹺鵕鵒鼽鶇鶅鸗鸉鴵麙鸞鸛鼢鼡龤

鹽鹺鹶齹PageCache龆龃鼽鼢鼡鴴鴳龁鴯齟 dynamic_page_cache 鵃鵱龒龏龌龊麍龏鴫鴨

本书共83小节:

评论 (写第一个评论)