Caching is the process of temporarily storing web data to improve website performance by reducing delays in content delivery. When caching is enabled in VergeCloud’s CDN service, website data is stored in various cache layers to enhance accessibility, efficiency, and availability.
When a user requests data that is not available in the CDN cache, the request is forwarded to the origin server. Once the origin server responds, the data is cached at the CDN edge, allowing subsequent requests for the same data to be served from the cache rather than the origin server. This reduces the load on the origin server and speeds up response times. The process is called a cache hit. If a request bypasses the cache and is served directly from the origin server, it’s referred to as a cache miss. Cache revalidation is also possible, depending on the configuration.
x-cache
response header in the browser’s developer tools.Consider a typical e-commerce website that serves static assets like product images, stylesheets, and JavaScript files. By enabling caching in VergeCloud, these static resources can be cached at the CDN edge servers. This reduces the load on the origin server and significantly improves the site’s load times for end users. If a customer visits a product page, the images and associated CSS files are quickly loaded from the cache, leading to a smoother experience.
Unlike browser caching, where you can only control how resources are stored in a user’s browser (with limitations on storage duration and type), CDN caching offers more flexibility. With VergeCloud, the administrator can specify which resources are cached, how they are stored on the CDN servers, and the duration for which they are kept. This results in more consistent performance across all users.
In contrast to browser caching—where first-time visitors or users who have cleared their cache experience delays—CDN caching ensures that content is delivered from the nearest edge server for faster access, regardless of the user's previous interactions with the website.
Log in to your VergeCloud account and navigate to the Caching Settings page. All caching features are configured on this page.
Select how VergeCloud handles content caching based on your needs:
Manage your cached content by purging outdated files:
Take advantage of the following advanced options to further optimize performance:
Set-Cookie
headers. Normally, CDNs avoid caching pages that include Set-Cookie
headers because these cookies often indicate personalized or session-specific data. However, this feature allows you to cache such pages when the core content remains static for all users. It is especially useful when:
Use this feature with caution to avoid serving incorrect personalized data.
If you haven’t specified custom cache rules, VergeCloud CDN will automatically cache files with the following extensions:
Image | Video | Audio | Code | Document | Archive | Other |
---|---|---|---|---|---|---|
gif | mpeg | midi | javascript | msword | x-gzip | octet-stream |
jpeg | webm | ogg | x-javascript | java-archive | x-redhat-package-manager | |
png | mp4 | x-m4a | css | rtf | x-msdownload | vnd.android.package-archive |
tiff | quicktime | x-realaudio | plain | postscript | x-font-woff | vnd.microsoft.icon |
x-icon | x-flv | x-vcard | epub+zip | x-font-ttf | vnd | |
vnd.microsoft.x-icon | x-ms-wmv | x-font-woff2 | wap | |||
webp | x-msvideo | Android | ||||
x-mng | x-m4v | x-jng | ||||
x-ms-bmp | x-ms-asf | wbmp |
yourdomain.com/*
yourdomain.com/about-us/*
Ensure that your page rules are prioritized correctly to avoid conflicts with other rules.
After configuring your caching settings, verify that they are working correctly:
x-cache
response header. A hit indicates that content is served from the cache.curl
or dig
to check the cache status.For example, run the following curl
command to check a resource's cache status:
curl -I https://example.com/resource