<!-- vale Canonical.007-Headings-sentence-case = NO -->

<a id="index"></a>

# Content cache operators

<!-- vale Canonical.007-Headings-sentence-case = YES -->

A [Juju](https://juju.is/) [charm](https://documentation.ubuntu.com/juju/3.6/reference/charm/)
deploying and managing a static web content cache with NGINX on VMs.

This machine charm manages a NGINX instance configured as a content cache. Backends are
configured through the `cache-config` relation, provided either by the
[Content Cache Backends Config subordinate charm](https://charmhub.io/content-cache-backends-config)
or by the [Ingress configurator charm](https://charmhub.io/ingress-configurator). The latter
can also be paired with the [HAProxy charm](https://charmhub.io/haproxy) to add
hostname/path-based routing, TLS termination, and other ingress features in front of the cache.

This charm should be used for caching static web content. When a client makes a request, this charm checks if the requested content is cached and valid. For an invalid cache, this charm will query the backends hosts for the content to refresh the cache. This process works well for static content that does not change based on the client. For this type of content, the cache can greatly reduce the load on the backend hosts.

Like any Juju charm, this charm supports one-line deployment, configuration, integration,
scaling, and more.
For content cache charm, this includes:

- Support for multiple backends via the `cache-config` relation (using the Content Cache Backends Config or Ingress configurator charms).
- Support for HTTPS, both to backends and for incoming ingress traffic.
- Observability with COS.

The charm simplifies the operation of an NGINX server as a static web content cache. This makes the charm suitable for users looking for a low maintenance way to reduce load on static websites.

## In this documentation

| **Get started**   | [Deploy with an ingress configurator and HAProxy](https://canonical.com/juju/docs/content-cache-charms/latest/tutorial/deploy-with-ingress-configurator-and-haproxy/index.html.md#tutorial-advanced-ingress)                                                                                                                                                                                                                                                        |
|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Operations**    | [Enable COS](https://canonical.com/juju/docs/content-cache-charms/latest/how-to/enable-cos/index.html.md#how-to-enable-cos) | [Upgrade](https://canonical.com/juju/docs/content-cache-charms/latest/how-to/upgrade/index.html.md#how-to-upgrade)                                                                                                                                                                                                                             |
| **Design**        | [Caching behavior](https://canonical.com/juju/docs/content-cache-charms/latest/explanation/caching-behavior/index.html.md#explanation-caching-behavior) | [Charm design](https://canonical.com/juju/docs/content-cache-charms/latest/explanation/charm-design/index.html.md#explanation-charm-design) | [Components](https://canonical.com/juju/docs/content-cache-charms/latest/reference/components/index.html.md#reference-components) | [Deployment architecture](https://canonical.com/juju/docs/content-cache-charms/latest/reference/deployment-architecture/index.html.md#reference-deployment-architecture) |
| **Security**      | [Overview](https://canonical.com/juju/docs/content-cache-charms/latest/explanation/security/index.html.md#explanation-security) | [Connect to HTTPS backends](https://canonical.com/juju/docs/content-cache-charms/latest/how-to/enable-https/index.html.md#how-to-enable-https) | [Hash client IP addresses in logs](https://canonical.com/juju/docs/content-cache-charms/latest/how-to/hash-client-ip-addresses-in-logs/index.html.md#how-to-hash-client-ip-addresses-in-logs)                                                                           |

## How this documentation is organized

This documentation uses the [Diátaxis documentation structure](https://diataxis.fr/).

- The [Tutorial](https://canonical.com/juju/docs/content-cache-charms/latest/tutorial/index.html.md#tutorial-index) takes you step-by-step through an advanced deployment fronted by an ingress configurator and HAProxy.
- [How-to guides](https://canonical.com/juju/docs/content-cache-charms/latest/how-to/index.html.md#how-to-index) assume you have basic familiarity with the content cache charm. Learn more about setting up, using, maintaining, and contributing to this charm.
- [Reference](https://canonical.com/juju/docs/content-cache-charms/latest/reference/index.html.md#reference-index) provides a guide to actions, configurations, relations, and other technical details.
- [Explanation](https://canonical.com/juju/docs/content-cache-charms/latest/explanation/index.html.md#explanation-index) includes topic overviews, background and context and detailed discussion.

### Contributing to this documentation

Documentation is an important part of this project, and we take the same open-source approach
to the documentation as the code. As such, we welcome community contributions, suggestions, and
constructive feedback on our documentation.
See [How to contribute](https://canonical.com/juju/docs/content-cache-charms/latest/how-to/contribute/index.html.md#how-to-contribute) for more information.

If there’s a particular area of documentation that you’d like to see that’s missing, please
[file a bug](https://github.com/canonical/content-cache-operator/issues).

## Project and community

The content cache charm is a member of the Ubuntu family. It’s an open-source project that warmly welcomes community
projects, contributions, suggestions, fixes, and constructive feedback.

### Governance and policies

- [Code of conduct](https://ubuntu.com/community/code-of-conduct)

### Get involved

- [Get support](https://discourse.charmhub.io/)
- [Join our online chat](https://matrix.to/#/#charmhub-charmdev:ubuntu.com)
- [Contribute](https://canonical.com/juju/docs/content-cache-charms/latest/how-to/contribute/index.html.md#how-to-contribute)

Thinking about using the content cache charm for your next project?
[Get in touch](https://matrix.to/#/#charmhub-charmdev:ubuntu.com)!

<!-- vale Canonical.013-Spell-out-numbers-below-10 = NO -->
<!-- vale Canonical.500-Repeated-words = NO -->

<a id="sphinx-documentation-starter-pack"></a>
<!-- SHORTCUTS -->
