SFRA applies storefront page-caching policy throughmiddleware, andcache.applyDefaultCacheis the standard middleware function used for a route that can safely use the default caching duration. Middleware is inserted into the controller route before the route ' s main callback, exactly as shown in option A.
This approach is preferable to embedding legacy-style cache directives directly into page templates because SFRA centralizes request behavior—caching, consent, authentication, CSRF validation, and similar concerns—in middleware chains. Salesforce ' s SFRA architecture describes routes as ordered middleware functions and showscache.applyDefaultCachein standard storefront routes. The existingPage-Includeroute, for example, explicitly declaresserver.middleware.includefollowed bycache.applyDefaultCache.
Option C is syntactically inconsistent with the SFRA server API becauseapplyDefaultCache()is middleware, not a method chained onto the result ofserver.get(). Option B can configure ISML cache behavior in other architectures, but it is not the preferred SFRA controller-level implementation requested here.
Study Guide reference:Application Development — SFRA middleware, page caching,cache.applyDefaultCache, controller routes, and caching best practices.
===============