Skip to content

Caching

The VIP Platform’s infrastructure includes several caching layers to enhance site performance.

Page cache

VIP’s page cache is the first layer of caching encountered by each request made to a WordPress or Node.js environment.

If a request meets specific criteria to bypass the page cache (e.g., a unique request, or a request with no-cache headers), the request will be routed to the origin server. If it qualifies, the new response will be cached at VIP’s global network of edge cache server locations for future requests. The cached version of content is served by the edge cache server closest to the user making the request.

The edge cache servers also serve static assets stored in the VIP File System, acting as a content delivery network (CDN).

Object cache

The WordPress object cache is the second layer of caching, encountered by requests that pass through the page cache and are routed to the origin servers. The object cache stores common or expensive operations directly into memory so that subsequent requests can quickly access them. It is regularly used for saving the results of database queries, remote HTTP requests, and any other operations that may be especially costly.

Compression

By default, Gzip compression is applied to responses from the page cache for:

  • Requests made to the VIP File System for file types: 
    css|js|json|xml|rss|svg|svgz|ico|txt|eot|ttf|atom.
  • Responses that specify a Content-Length header and have a value of 500 bytes or greater.
  • Responses with chunked transfer encoding.

Files larger than 1GB will not have compression applied to them and will not be stored in the cache.

Additional enhancements

  • If enqueued, an application’s JavaScript and CSS files are concatenated to reduce the number of requests on a single page load. CSS files are minified and concatenated, reducing file size by removing unnecessary white space.
  • The VIP edge cache respects the vary: X-Country-Code response header, making it possible to deliver variations of cached content based on an end user’s global location (IP geolocation). 
  • Some customizations for page cache behavior can be made using the Cache API.

Last updated: February 29, 2024

Relevant to

  • Node.js
  • WordPress