[id='templates-{context}']
= Cache Templates
{brandname} lets you define templates that you can use to create cache configurations.

For example, the following configuration contains a cache template:

[source,xml,options="nowrap",subs=attributes+]
----
include::config_examples/local_cache_template.xml[]
----

.Inheritance with configuration templates
Configuration templates can also inherit from other templates to extend and
override settings.

[NOTE]
====
Cache template inheritance is hierarchical. For a child configuration template to inherit from a parent, you must include it after the parent template.
====

The following is an example of template inheritance:

[source,xml,options="nowrap",subs=attributes+]
----
include::config_examples/cache_template_inheritance.xml[]
----

[IMPORTANT]
====
Configuration template inheritance is additive for elements that have multiple
values, such as `property`. Resulting child configurations merge values from
parent configurations.

For example, `<property value_x="foo" />` in a parent configuration merges with
`<property value_y="bar" />` in a child configuration to result in `<property
value_x="foo" value_y="bar" />`.
====
