Using VergeCloud Caching Settings To Improve your webiste Performance

Caching

Overview

Caching plays a crucial role in improving website performance by temporarily storing web content so it can be delivered faster and with less strain on your origin server. When caching is enabled through VergeCloud’s CDN, your content is stored across multiple layers in our global edge network. This ensures that users around the world experience faster load times, more consistent availability, and a smoother browsing experience regardless of traffic spikes or geographic distance.

In simple terms, caching helps your website respond faster because frequently requested content does not have to be fetched from your origin server every time. Instead, the CDN delivers it directly from the nearest edge location. This reduces server load, minimizes latency, and improves the overall performance of your application.

Glossary

  1. Cache Hit – Content successfully served from the CDN cache.
  2. Cache Miss – Content fetched directly from the origin server when not found in cache.
  3. Cache Level – Defines how VergeCloud caches content (no cache, cache without query strings, or cache with query strings).
  4. Cache Max Age – How long cached content remains valid before revalidation.
  5. Always Online – Serves cached content when the origin server becomes unavailable.

How Caching Works

Whenever a user visits your website, VergeCloud’s CDN checks if the requested content is already stored in the cache.
If it is available, the CDN serves it immediately from the closest edge server. This is known as a cache hit, and it results in a fast and efficient response.
If the content is not available, the request is forwarded to your origin server. This is known as a cache miss. After receiving the response from the origin, VergeCloud stores the content at the edge so that future requests can be served directly from cache.

By reducing how often the origin server is contacted, caching significantly improves performance while ensuring your infrastructure remains stable even during heavy traffic.

It is important to remember that CDNs typically cache only certain kinds of content by default. These include static assets such as images, videos, CSS and JavaScript files, documents, fonts, and similar file types. Using your browser’s developer tools, you can inspect the x cache header to see whether a resource was delivered from the CDN or fetched from your origin.

NotesNote: Only certain data types are cached by default, typically static files such as images, CSS, JavaScript, fonts, and documents.
Use your browser’s developer tools to inspect the x-cache response header to see cache behavior.

Real Usage Example

Consider an e commerce platform with hundreds of product images and multiple script and style files that remain unchanged for long periods. When caching is active on VergeCloud, these assets are stored at edge locations. As customers browse product pages, the images and scripts load instantly because the CDN serves them directly. This reduces page load times, lowers the number of origin requests, and keeps the experience fast for shoppers across all regions. The origin server can also handle dynamic requests more efficiently since static content is offloaded to the CDN.

CDN Caching vs. Browser Caching

Both CDN caching and browser caching help improve website performance, but they operate at different layers.

CDN caching is controlled through VergeCloud settings and works globally for all users. It stores content on edge servers and benefits both new and returning visitors. Even users in private browsing modes receive fast responses because the CDN does not rely on device storage.

Browser caching, on the other hand, depends on local browser rules and the amount of storage available on the user’s device. It helps with repeat visits but does not improve first time load performance. Storing very large files in the browser cache is also limited.

Configuration Guide

 

1. Access Caching Settings

Sign in to your VergeCloud dashboard and navigate to the Caching Settings page. This is where you manage cache levels, edge behavior, browser caching, and advanced options.

2. Configure Cache Level

Choose how VergeCloud should cache content:

• Off: No caching, meaning every request is sent to the origin.
• Without QueryString: VergeCloud caches content while ignoring query parameters. This is ideal for static files where query strings do not affect the output.
• With QueryString: VergeCloud stores different versions of a resource based on query parameters. This is useful when query strings determine the content returned.

3. Purge Cache

If you make updates to your website, you may need to purge cache:

• Purge Individual Files: Clears the cache for a specific file such as an updated image or script.
• Purge Everything: Clears all cached content at every edge location. Use this only when absolutely necessary, as it can temporarily increase load on your origin.

4. Additional Caching Features

Cache Max Age lets you specify how long content should remain in cache before the CDN checks with your origin again.
Cache Error Pages allows VergeCloud to temporarily cache non successful responses, reducing pressure on your origin during outages or traffic surges.
Maximum Cache Size defines the largest file size the CDN is allowed to store, which is helpful for large media files.
Browser Cache Duration controls how long a user’s browser stores assets, improving load times on repeat visits.
Caching files that include Set Cookie headers is possible in specific cases where the content is static and cookies are meant only for analytics. Use this carefully to avoid exposing personalized data.
Development Mode ensures that all requests bypass the cache so you can see changes in real time.
Always Online keeps your website accessible by serving cached versions if your origin becomes unreachable.

Default Cacheable Extensions

If no custom rules are set, VergeCloud automatically caches commonly used static file types including images, video, audio, JavaScript, CSS, documents, archives, fonts, and several standard binary formats.

Caching HTML Pages with Page Rules

HTML documents are not cached by default because they often contain dynamic or personalized content. If your pages are static or change infrequently, you can enable HTML caching using a Page Rule.

Examples:
• To cache the entire site: yourdomain.com/*
• To cache a single page: yourdomain.com/about us

Make sure your Page Rules are ordered correctly to avoid conflicts.

API Reference

VergeCloud provides a dedicated set of Caching APIs. These endpoints allow you to retrieve current cache configurations, update caching behavior, and purge cached content whenever needed.
Explore all caching-related endpoints here: https://api.vergecloud.com/docs#tag/caching

Testing and Validation

After configuring your caching settings, verify that they are working correctly:
  1. Use your browser’s developer tools to inspect the x-cache response header. A hit indicates that content is served from the cache.
  2. You can also use tools like 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


    • Related Articles

    • Page Rules

      Overview VergeCloud Page Rules allow you to customize and fine-tune how your domain behaves within the VergeCloud CDN ecosystem. They give you granular control over performance, security, caching, redirects, and request handling at the edge. Instead ...
    • Getting Started

      Overview Once you’ve created your VergeCloud account and signed in, you can proceed to set up your domain for CDN and security services. If you haven’t created an account yet, please start here: Account Creation and Sign In Guide The following steps ...
    • Boost Web Pages

      Overview Web Boost improves the loading speed and overall performance of your website by optimizing static assets, images, and code delivery. Faster pages lead to better SEO rankings, lower bounce rates, improved user engagement, and higher ...
    • DNS Cloud Option

      Overview After migrating your website to VergeCloud and completing the necessary DNS configurations, you can view and manage DNS Records for your domain and its subdomains directly from the DNS Records section within the VergeCloud dashboard. This ...
    • How to Whitelist VergeCloud’s IP Addresses in Your Firewall

      Overview To ensure seamless communication between VergeCloud’s edge servers and your origin or main server, it is essential to whitelist VergeCloud’s IP addresses in your firewall configuration. Without whitelisting, your firewall may block ...