Skip to content

Commit a8b041e

Browse files
authored
Comment out CDN in data fetching guide (#7404)
* docs: add best practices collection and data fetching guide * docs: add data fetching examples * docs: explain why not to fetch lazy loaded data server side * docs: comment out info about CDN
1 parent a8e2980 commit a8b041e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Diff for: docs/content/guides/6.best-practices/2.data-fetching.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ The rule of thumb is: _always use server-side fetching except for_:
4242

4343
Alokai architecture introduces the Middleware in between the front-end application and the APIs. This adds two additional possible routes to our diagram, but most of the traffic should go through the middleware, because:
4444

45-
- it is cached on the CDN
45+
<!-- Uncomment below when CDN caching is availavble -->
46+
<!-- - it is cached on the CDN -->
4647
- it keeps your architecture simple
4748
- you can easily monitor middleware traffic in the console
4849
- enables [data federation](/middleware/guides/federation)
@@ -58,13 +59,17 @@ Fortunately, we can reject the route between the server and the API, because:
5859
The direct route between the browser and API should be avoided, because it:
5960

6061
- tightly couples storefront with the API,
61-
- reduces performance by bypasses CDN cache.
62+
<!-- Uncomment below when CDN caching is availavble -->
63+
<!-- - reduces performance by bypassing CDN cache. -->
6264

6365
Use direct direct browser to API calls only when communicating via middleware is not possible or requires unnecessary effort. Sample scenarios when it might be valid to communicate directly between client and API:
6466

6567
- the communication requires extremely low latency - e.g. voice or video stream
6668
- communication with API is done via some SDK that requires direct client (browser) interaction - e.g. analytics or authentication services
6769

70+
71+
<!-- Uncomment below when CDN caching is availavble -->
72+
<!-- ## CDN Caching
6873
## CDN Caching
6974
7075
To further improve your application performance we encourage you to enable the CDN. The CDN is capable of caching responses from the server and the middleware to the browser.
@@ -73,7 +78,7 @@ To further improve your application performance we encourage you to enable the C
7378
7479
::info
7580
[Read more about caching here.](/storefront/features/cdn/making-ssr-cacheable)
76-
::
81+
:: -->
7782

7883
## Examples
7984

0 commit comments

Comments
 (0)