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

# cache_policy - Composite topics

> Sets the cache policy for the composite topic.

Sets the cache policy for the composite topic. Cache policies are defined at the model level using the [`cache_policies`](/modeling/models/cache-policies) parameter.

## Syntax

```yaml theme={null}
cache_policy: <policy_name>
```

## Properties

<ParamField path="cache_policy" type="string">
  The name of a cache policy defined in the model file. Must reference a policy from the model's [`cache_policies`](/modeling/models/cache-policies) configuration.
</ParamField>

## Behavior

When `cache_policy` is unset, the composite topic resolves its effective cache policy to the shortest `max_cache_age` among its sub-topics.  This ensures the composite is never served staler than its strictest member.

## Examples

### Explicit cache policy

```yaml theme={null}
cache_policy: daily_cache_policy
```

### Default resolution behavior

If `cache_policy` is unset, the composite uses the shortest `max_cache_age` from its component topics:

```yaml theme={null}
# Composite topic with no explicit cache_policy
topics:
  - orders_topic        # has cache_policy: hourly_cache (max_cache_age: 1 hour)
  - marketing_topic     # has cache_policy: daily_cache (max_cache_age: 24 hours)
  - support_topic       # no cache_policy, falls back to model's default_cache_policy

# The composite resolves to the shortest max_cache_age (1 hour from orders_topic)
```
