Skip to content

Commit

Permalink
Merge pull request #1502 from G-Core/mariyayurlova-patch-2
Browse files Browse the repository at this point in the history
Create test-cdn
  • Loading branch information
mariyayurlova authored Jan 9, 2025
2 parents 57107a8 + 14b353c commit 01a0b7f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions documentation/cdn/cdn-resource-options/cache/test-cdn
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: test-cdn
displayName: Test
published: true
order: 55
toc:
pageTitle: Test
pageDescription: Test
---
# Always online: provide the stale cache if the origin is unavailable

The option allows serving stale cached content in case of the following errors: error (network or connectivity issues), timeout, invalid_header, updating (cache updating),http_500, http_502, http_503, http_504, http_403, http_404, http_429.

HTTP response for the stale content will contain the header X-Cache: Stale. CDN will check origin availability with each user’s request. As soon as the origin becomes available, fresh files will be cached and served. If the origin is unavailable for a long time, CDN will send Stale content until origin becomes available. 

Please, note that when the site is unavailable, the CDN cache may have not enough content for a correct page display. Situations, when a user will not be able to see some images, style sheets, or other static content, are possible.

To manage this option go to your Resource Advanced Settings, find the **Cache** section and click **Always online**. You can enable the toggle and choose error codes for which a CDN serves stale content. 

<img src="https://assets.gcore.pro/docs/cdn/cdn-resource-options/cache/always-online-provide-the-stale-cache-if-the-origin-is-unavailable/cdn-always-online-enabled.png" alt="Always Online toggle enabled" width="80%">

0 comments on commit 01a0b7f

Please sign in to comment.