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 鵲鶝龕龔龓龒麕龔鵝鵛

本书共63小节:

评论 (写第一个评论)