LATEST VERSION: 8.1.0 - CHANGELOG
Pivotal GemFire® v8.1

cache.xml Quick Reference

cache.xml Quick Reference

This section documents cache.xml file requirements and variables. It also points you to specific element sections for server, client, and WAN configuration.

Cache XML Requirements

The cache.xml file has these requirements:

Variables in cache.xml

You can use variables in the cache.xml to customize your settings without modifying the XML file.

Set your variables in Java system properties when you start your cache server or application process.

Example cache.xml with variables and the gfsh start server command that sets the variables:
<?xml version="1.0" encoding="UTF-8"?>
<cache
    xmlns="http://schema.pivotal.io/gemfire/cache"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://schema.pivotal.io/gemfire/cache http://schema.pivotal.io/gemfire/cache/cache-8.1.xsd"
    version="8.1">
  <cache-server port="${PORT}" max-connections="${MAXCNXS}"/>
  <region name="root">
    <region-attributes refid="REPLICATE"/>
  </region>
</cache>
gfsh>start server --name=server2 --cache-xml-file=cache.xml --J=-DPORT=30333 --J=-DMAXCNXS=77

Configuration Quick Reference

To configure cache servers, clients, and WAN topologies, see the following sections:

  • Server Configuration

    You can set the same server configuration properties using the com.gemstone.gemfire.cache.server.CacheServer and com.gemstone.gemfire.cache.Cache interfaces. For detailed information, see the online Java API documentation.

  • Client Configuration

    You can set the same client configuration properties using the com.gemstone.gemfire.cache.clientClientCache and Pool interfaces. For detailed information, see the online Java API documentation.

  • Multi-site (WAN) Configuration and Asynchronous Event Queue Configuration

    The gateway sender and receiver APIs in com.gemstone.gemfire.cache.util provide corresponding getter and setter methods for these attributes.