Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Builds and It's Completely Different but Also Still Build #18955

Open
wants to merge 15 commits into
base: production
Choose a base branch
from
Open
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 15 additions & 12 deletions src/content/docs/pages/configuration/build-caching.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ pcx_content_type: concept
title: Build caching
---

Improve Pages build times by turning on build caching to restore dependencies and build output between builds. The first build to occur after enabling build caching on your Pages project will save to cache. Every subsequent build will restore from cache unless configured otherwise.
Improve Pages build times by caching dependencies and build output between builds with a project-wide shared cache.

The first build to occur after enabling build caching on your Pages project will save to cache. Every subsequent build will restore from cache unless configured otherwise.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The first build to occur after enabling build caching on your Pages project will save to cache. Every subsequent build will restore from cache unless configured otherwise.
After you enable build caching on your Pages project, the first build that runs will populate the build cache. Each subsequent build will restore from cache unless otherwise configured.

"otherwise configured" == you purge cache?


## Requirements
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find the headings in this article to be a slightly overkill and the organization seems a little mixed up. Maybe it could be something like:

  • About build caching
    • Requirements
    • Package managers
    • Frameworks
    • Limits
  • Enable build caching
  • Clear build caching


Expand All @@ -13,22 +15,21 @@ Build caching requires the [V2 build system](/pages/configuration/build-image/#v

### Enable build caching

To enable build caching in the Cloudflare dashboard:
To enable build caching :

1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account.
2. In Account Home, select **Workers & Pages**.
3. In **Overview**, select your Pages project.
4. Go to **Settings** > **Build** > **Build cache** and select **Enable**.
1. Navigate to [Workers & Pages Overview](https://dash.cloudflare.com) on the Dashboard.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Navigate to [Workers & Pages Overview](https://dash.cloudflare.com) on the Dashboard.
1. Navigate to [Workers & Pages Overview](https://dash.cloudflare.com/?to=/:account/workers-and-pages/) on the Dashboard.

2. Find your Pages project.
3. Go to **Settings** > **Build** > **Build cache**.
4. Select **Enable** to turn on build caching.

### Clear cache

The build cache can be cleared for a project if needed, such as when debugging build issues. To clear the build cache:

1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account.
2. In Account Home, select **Workers & Pages**.
3. In **Overview**, select your Pages project.
4. Go to **Settings** > **Build** > **Build cache**.
5. Select **Clear Cache** to clear the build cache.
1. Navigate to [Workers & Pages Overview](https://dash.cloudflare.com) on the Dashboard.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Navigate to [Workers & Pages Overview](https://dash.cloudflare.com) on the Dashboard.
1. Navigate to [Workers & Pages Overview](https://dash.cloudflare.com/?to=/:account/workers-and-pages) on the Dashboard.

2. Find your Pages project.
3. Go to **Settings** > **Build** > **Build cache**.
4. Select **Clear Cache** to clear the build cache.

## How build caching works

Expand All @@ -47,7 +48,9 @@ Pages will cache the global cache directories of the following package managers:

### Frameworks

Caching the build output from frameworks can speed up subsequent build times. The build cache supports the following frameworks:
Some frameworks provide a cache directory that is typically populated by the framework with intermediate build outputs or dependencies during build time. Pages will automatically detect the framework you are using and cache this directory for reuse in subsequent builds.

The following frameworks support build output caching:

| Framework | Directories cached |
| ---------- | --------------------------------------------- |
Expand Down
128 changes: 0 additions & 128 deletions src/content/docs/pages/configuration/git-integration.mdx

This file was deleted.

Loading
Loading