Improving build performance

Last modified: December 19th, 2023

Working with a specific static site generator?
Customize CloudCannon's documentation to suit your SSG.

Great! We'll show you documentation relevant to .
You can change this any time using the dropdown in the navigation bar.

CloudCannon lets you choose certain files and folders to cache between builds. This can let you bypass install steps, speeding up subsequent builds.

Preserved paths#

Preserved Paths let you set a comma-separated list of paths that should not be deleted in subsequent builds. These can be folders or full filenames.

Be careful caching files, as this could result in files sticking around after deleting them from the repo. A good rule is that these paths should also be good examples of paths for your .gitignore file.

If you are doing any image processing or plugin-level caching, specify that directory, or the full filename. A specific example would be caching your node_modules/ directory, which would allow npm install commands to run more quickly on subsequent builds.

To update your preserved paths:

  1. Navigate to the Configuration tab under Site Settings, and Builds.
  2. Click on the Caching Options card to expand it.
  3. Enter a comma-separated list of file paths you want to preserve between builds.
  4. Click the Update Configuration button.

Your preserved paths may not be retrieved from cache if your build is allocated to a different server, or if the server has been restarted since your last build.

Caching Gem installs#

Installing your Gems can take quite some time.

To save time on consecutive builds CloudCannon does the following:

  1. Installs your gems to a local folder
  2. Caches that folder based on your Gemfile.lock
  3. When no local gems are found, CloudCannon will build your site using the cached installs from your previous build

To disable this feature, go to Site Settings / Build.

Older Jekyll sites on CloudCannon will have this caching disabled to prevent changes to their build environment. Enabling this can greatly improve editing experience.

Open in a new tab