Example cache.xml File

An example cache.xml file shows cache and region initialization for a client. The example shows only a subset of the possible data configurations.

For detailed information about cache and region configuration, including the default attribute settings, see The Native Client Cache. Also see the online API documentation for Cache and RegionAttributes.

For information a cache with server pool, see Using Connection Pools. The example below shows a cache.xml file that creates two regions.
<?xml version="1.0" encoding="UTF-8"?>
    "-//GemStone Systems, Inc.//GemFire Declarative Caching 7.0//EN"
<!-- Sample cache.xml file -->
<!-- Example Declarative Cache Initialization with cache.xml -->
    <pool name="examplePool" subscription-enabled="true">
        <server host="localhost" port="24680" />
    <region name="root1" refid="CACHING_PROXY">
        <region-attributes pool-name="examplePool"
                <expiration-attributes timeout="20" action="destroy"/>
                <expiration-attributes timeout="10" action="invalidate"/>
                <expiration-attributes timeout="5" action="local-destroy"/>
                <expiration-attributes timeout="10" action="local-invalidate"/>

For details about the individual region attributes, see Region Attributes.