Request प्रोसेसिंग · प्रश्न 4 / 12
एक Extbase action को हर page request पर वर्तमान data deliver करना चाहिए और उसे cache नहीं होना चाहिए। इसे कहाँ configure करते हैं?
1 उत्तर सही है। आसान
उत्तर दिखाएँ
उत्तर
- B ExtensionUtility::configurePlugin() में, चौथे argument में, जो non-cacheable actions सूचीबद्ध करता है
व्याख्या
जब ext_localconf.php में कोई plugin register होता है, तो ExtensionUtility::configurePlugin() का तीसरा argument सभी अनुमत actions और चौथा argument non-cacheable actions सूचीबद्ध करता है, उदाहरण [ShopController::class => 'cart']। ऐसे action के call होने पर TYPO3 plugin को USER_INT object की तरह execute करता है, जबकि page का बाकी भाग cached रहता है। इस तरह shopping cart वर्तमान रहता है, बिना पूरे page को cache छोड़ना पड़े। Extbase में #[NoCache] attribute नहीं है, और पूरे pages के लिए cache बंद करना performance को अनावश्यक रूप से नुकसान पहुँचाएगा।