You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/storefront/themes/cdn-and-caching.md
+12-5Lines changed: 12 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,28 +4,35 @@ sidebar_position: 2
4
4
title: Storefront CDN & Caching
5
5
---
6
6
7
-
Storefront leverages many caching strategies to ensure fast performant user experiences for your end customers.
7
+
Storefront leverages CDNs and many caching strategies to ensure fast performant user experiences for your end customers.
8
8
9
-
:::tip Use Network Domain while Building Themes
9
+
:::info Use Network Domain while Building Themes
10
10
Always use the store network domain `{store}.29next.store` when developing themes to bypass full page caching and preview your latest updates.
11
11
:::
12
12
13
-
### Assets CDN
13
+
### Asset CDN
14
14
15
15
All merchant uploaded media assets and theme assets are loaded from our CDN for the fastest performance.
16
16
17
+
-**Media** - Links to uploaded media should always use the `cdn.29next.store`
18
+
-**Theme Assets** - Theme assets should use the [asset_url](/docs/storefront/themes/templates/filters.md#asset_url) in templates which always generates a full CDN link on the storefront.
19
+
17
20
### Full Page Caching
18
21
19
-
All pages on storefront are cached for 5 minutes under the following conditions.
22
+
All pages on storefront are cached for 5 minutes to ensure popular pages are as fast as possible for customers and minimal impact on the overall platform load.
20
23
21
24
- User is Anonymous (unauthenticated).
22
25
- Domain is a merchant mapped domain.
23
26
- Page is not dynamic, ie `/cart/`, `/checkout/`, `/accounts/` do not use full page caching.
24
27
25
28
29
+
:::tip
30
+
To skip the cache, you can append a unique querystring such as `?skip_cache` to skip existing cache and see the latest.
31
+
:::
32
+
26
33
### Template Caching
27
34
28
-
Themes use many templates ie layouts, partials, and assetswhen compiled together create amazing customer experiences. Templates are cached in memory to reduce database queries when compiling templates into the full html response.
35
+
Themes use many templates ie `layouts`, `partials`, and `assets` that when compiled together create amazing customer experiences. Templates are cached in memory to reduce database queries when compiling templates into the full html response.
29
36
30
37
Updating a template through the dashboard or [Theme Kit](/docs/storefront/themes/theme-kit.md) should automatically purge the cache for you to see your latest changes on the network domain, see notes above.
0 commit comments