> ## Documentation Index
> Fetch the complete documentation index at: https://citodocs.prostack.host/llms.txt
> Use this file to discover all available pages before exploring further.

# Caching

> Enable Boost page caching to accelerate WordPress and WooCommerce sites

Cito has a built-in page-cache feature, **Boost** to accelerate Wordpress and Woocommerce websites. It's designed to offer extremely fast performance and minimal overhead.

We recommend testing it on staging sites first to ensure there is no unusual cache behaviour.

By default, we cache resources for 6 hours.

## How to enable & disable the cache

Click the menu icon on the top right corner of a site card and select 'Settings'. From here you will see the Boost option in the site settings page.

<img src="https://mintcdn.com/prostackhosting/mdYxEEoAStQaBUbz/images/screenshots/boost.png?fit=max&auto=format&n=mdYxEEoAStQaBUbz&q=85&s=98e22c3b480364a48fd2b71bf4d0b61a" alt="Boost" width="2008" height="276" data-path="images/screenshots/boost.png" />

You can toggle Boost on or off using the switch in this section. With Boost enabled you'll also see a Purge button to enable you to purge the entire cache.

## How to tell if a page is cached

We have a response header added to all sites using Boost: `x-prostack-boost`

There are 3 statuses:

**HIT**: This indicates the page *is* being served from cache.

**MISS**: The page is *not* being served from cache

**BYPASS**: The page is bypassing the cache- because there's a rule to exclude it. Usually used on shopping cart pages or logged in areas, such as wp-admin.

Note: the first hit for any page will always be a `MISS` unless the cache is already populated. In testing you should always test twice.

## Cache Purging

### Purging the entire cache

Click the menu icon on the top right corner of a site card and select 'Settings', then the Purge Cache button.

<img src="https://mintcdn.com/prostackhosting/mdYxEEoAStQaBUbz/images/screenshots/boost.png?fit=max&auto=format&n=mdYxEEoAStQaBUbz&q=85&s=98e22c3b480364a48fd2b71bf4d0b61a" alt="Boost" width="2008" height="276" data-path="images/screenshots/boost.png" />

You can also purge via the CLI:

```bash theme={null}
psboost -p <domain>
```

### Purge when changes are made

To enable purge-on-change (i.e. purge a specific page when it is updated or changed) you need a plugin. We recommend [Nginx Helper](https://en-gb.wordpress.org/plugins/nginx-helper/).

Once Nginx Helper is installed you can enable it via "Nginx Settings". Simply tick the "Enable Purge" checkbox and ensure the Caching Method setting is "nginx FastCGI cache". This is the default.

## Default cache configuration

We bypass the cache for the following:

* POST requests
* Any URL with a query string (`?=`) in it
* Woocommerce cart, basket or checkout pages
* Wordpress admin areas
* Any logged-in user

You can view the full cache bypass configuration in `/etc/nginx/conf.d/accel/accel-site.conf`.

## Troubleshooting

If you wish to add a custom rule (e.g. to exclude a page or cookie from caching) contact Support.
