Pivotal GemFire® v8.0

Configuring Caches

Configuring Caches

To create a cache, you include the cache declaration in your Spring application context XML configuration file. Because this declaration contains no properties, the default configuration is used.


The Spring application context registers a CacheFactoryBean that creates a Spring bean named gemfireCache. This Spring bean references a GemFire Cache instance. You can add an id property to override the default name.

You can also specify GemFire properties that configure the cache using standard Spring features. For example, the following declaration in a Spring application context XML file uses the Spring util namespace to reference an external properties file:
     <gfe:cache properties-ref="props"/>

There are additional properties you can use to configure memory usage, serialization, timeouts, and more. For a description of these properties and other configuration options, see Spring Data Gemfire Schema.

Additional Resources: