A Practical Guide to Caching with VergeCloud CDN

Caching on VergeCloud: A Step-by-Step Guide to Faster Content Delivery


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 next-gen 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 solutions help 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.

Essential Caching Terms in VergeCloud

Cache Hit – Content successfully served from the CDN cache.
Cache Miss – Content fetched directly from the origin server when not found in cache.
Cache Level – Defines how VergeCloud caches content (no cache, cache without query strings, or cache with query strings).
Cache Max Age – How long cached content remains valid before revalidation.
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.

Note: 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-World Caching 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.

Configuring Caching Settings in VergeCloud

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.

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.

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.

Additional Caching Features

1. Cache Max Age lets you specify how long content should remain in cache before the CDN checks with your origin again.

2. Cache Error Pages allows VergeCloud to temporarily cache non successful responses, reducing pressure on your origin during outages or traffic surges.

3. Maximum Cache Size defines the largest file size the CDN is allowed to store, which is helpful for large media files.

4. Browser Cache Duration controls how long a user’s browser stores assets, improving load times on repeat visits.

5. 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.

6. Development Mode ensures that all requests bypass the cache so you can see changes in real time.

7. Always Online keeps your website accessible by serving cached versions if your origin becomes unreachable.

Default Cacheable Content in VergeCloud

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.

VergeCloud Caching 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

Validating Caching Settings in VergeCloud

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:

  1. curl -I https://example.com/resource

By leveraging VergeCloud’s caching solutions, your website can achieve faster load times, reduced server load, and a smoother user experience worldwide. And if you encounter any issues or need assistance with your caching setup, VergeCloud provides reliable 24/7 cloud support to ensure your site stays fast, available, and optimized at all times.

    • Related Articles

    • VergeCloud Page Rules: A Practical Guide to Fine-Tuning Your Site

      VergeCloud Page Rules allow you to customize and fine-tune how your domain behaves within the VergeCloud secure CDN ecosystem. They give you granular control over performance, security, caching, redirects, and request handling at the edge. Instead of ...
    • How to Configure Load Balancing on VergeCloud: Step by Step

      VergeCloud’s Load Balancer intelligently manages and distributes incoming traffic across multiple origin servers, providing seamless multi-cloud load balancing. This ensures high availability, stable performance, and consistently low response times ...
    • VergeCloud Firewall: A Step-by-Step Configuration Guide

      The VergeCloud Firewall provides granular control over the HTTP(S) traffic flowing to your website or application. Serving as an intelligent security layer at the edge, it allows you to filter requests, protect critical endpoints, block malicious ...
    • Steps to Activate Cloud Icon for VergeCloud

      Overview Before you activate the Cloud icon for your domain in VergeCloud, it’s important to make sure your server and DNS setup are fully prepared to work with the platform. Turning on the Cloud icon changes the way traffic reaches your website, ...
    • 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 ...