[id='cache_configuration']
:context: configuring
= Configuring {brandname} Caches
{brandname} lets you define properties and options for caches both
declaratively and programmatically.

Declarative configuration uses XML files that adhere to a {brandname} schema.
Programmatic configuration, on the other hand, uses {brandname} APIs.

In most cases, you use declarative configuration as a starting point for cache
definitions. At runtime you can then programmatically configure your caches to
tune settings or specify additional properties. However, {brandname} provides
flexibility so you can choose either declarative, programmatic, or a
combination of the two.

include::{topics}/ref_config_declarative.adoc[leveloffset=+1]
include::{topics}/ref_config_templates.adoc[leveloffset=+2]
include::{topics}/ref_config_wildcards.adoc[leveloffset=+2]
include::{topics}/ref_config_xinclude.adoc[leveloffset=+2]

include::{topics}/ref_config_programmatic.adoc[leveloffset=+1]
include::{topics}/ref_config_programmatic_objects.adoc[leveloffset=+2]

// Restore the parent context.
ifdef::parent-context[:context: {parent-context}]
ifndef::parent-context[:!context:]
