In a partitioned configuration, the data is divided across multiple True Caches, which each cache a different subset of the data. The total size of the cached data across all True Caches can be much larger than it would be for a single primary database or a single cache in a uniform configuration.
This diagram shows an example of a partitioned configuration where each True Cache caches data for a different database application service. The diagram has the following elements:
- One primary database (
PRIMDBI
) - Two True Caches (
TCDB1I
andTCDB2I
) - One remote listener (
sales_rl
) - Two applications connected to different database application services (
SALES
andHR
)
When True Cache starts, the True Cache network name that is specified in the FAL_CLIENT
parameter (TCDB1I
or TCDB2I
) is registered with the primary database network name that is specified in the FAL_SERVER
parameter (PRIMDBI)
.
If the application handles connections manually, it sends queries to True Cache through a True Cache database application service, and it sends other queries and updates to the primary database through the primary database application service.
To achieve more application transparency, you can use the JDBC method and associate primary database application services with True Cache database application services. This diagram shows the following database application services:
- The primary database (
PRIMDBI
) runs two database application services:SALES
andHR
. - Two True Caches are associated with different database application services:
TCDB1I
is associated withSALES_TC
.TCDB2I
is associated withHR
_TC
.
The services are associated by setting the TRUE_CACHE_SERVICE
parameter to SALES_TC
and HR_TC
for the corresponding primary database application services (SALES
and HR
). The application's code only needs to know about the primary database application services (SALES
and HR
). To use the SALES_TC
and HR_TC
database application services, the application changes the setReadOnly
flag (TRUE
or FALSE
) of the SALES
and HR
JDBC connections.
The True Caches and the primary database share a remote listener (sales_rl
).