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 鵛鶄龚龗龕龒麒龗鵈鵆

本书共71小节:

评论 (写第一个评论)