cache-mapping
Used in: caching-scheme-mapping
Description
Each cache-mapping element specifyies the cache-scheme which is to be used for a given cache name or pattern.
Elements
The following table describes the elements you can define within the cache-mapping element.
| Element | Required/Optional | Description |
|---|---|---|
| <cache-name> | Required | Specifies a cache name or name pattern. The name is unique within a cache factory.
The following cache name patterns are supported:
The patterns get matched in the order of specificity (more specific definition is selected whenever possible). For example, if both "MyCache" and "My*" mappings are specified, the scheme from the "MyCache" mapping will be used to configure a cache named "MyCache". |
| <scheme-name> | Required | Contains the caching scheme name. The name is unique within a configuration file.
Caching schemes are configured in the caching-schemes section. |
| <init-params> | Optional | Allows specifying replaceable cache scheme parameters.
During cache scheme parsing, any occurrence of any replaceable parameter in format "param-name" is replaced with the corresponding parameter value. Consider the following cache mapping example: For any cache name match My*, any occurrence of the literal cache-loader in any part of the corresponding cache-scheme element will be replaced with the string com.acme.MyCacheLoader and any occurrence of the literal size-limit will be replaced with the value of 1000.
|