Configuring a Temenos Specific Cache
This section shows you how to create an user-defined cache for TAFJLocalCacheFactory provider.
For Temenos caching, configure the following property in the caching.properties file.
temn.cache.external.caching.provider= com.temenos.tafj.cache.TAFJLocalCacheFactory
What is a Tables cache?
When you create the TAFJ_CACHE
table and insert the default entries in it, the cache defined during the process is called Tables. By default, Tables is configured in the caching.properties file.
To configure a user-defined cache, you need to use the following syntax:
temn.tafj.cache.name.My new cache=My new cache temn.tafj.cache.name.My new cache.expiryTime.seconds=x temn.tafj.cache.name.My new cache.memory=nM temn.tafj.cache.name.My new cache.evictionPolicy=LRU
The following is the Tables configuration.
temn.tafj.cache.name.Tables=Tables temn.tafj.cache.name.Tables.expiryTime.seconds=14400 temn.tafj.cache.name.Tables.memory=100M temn.tafj.cache.name.Tables.evictionPolicy=LRU
This cache deletes entries after 4 hours (14400 seconds) or when the memory exceeds 100 MB for the cache. In this case, a LFU (Least Frequently Used) policy is used to delete entries. A LFU policy is also supported.
Working with an user-defined cache
The user-defined cache is SHORTLIVED and F.DATES is the table as shown in the below example:
- Make the following configurations in the caching.properties file.
temn.tafj.cache.name.SHORTLIVED = SHORTLIVED temn.tafj.cache.name.SHORTLIVED.expiryTime.seconds=60 temn.tafj.cache.name.SHORTLIVED.memory=100M temn.tafj.cache.name.SHORTLIVED.evictionPolicy=LRU
- Insert a record in the
TAFJ_CACHE
table using the SQL command below.INSERT INTO TAFJ_CACHE(RECID,CACHENAME,WRITEBATCHROWS) VALUES ('F.DATES','SHORTLIVED',NULL);
Now, whenever a row is read from the database, it will be cached locally across one or many application servers (based on the selected TAFJ caching provider) for 60 seconds or until it is evicted by LRU policy.
In this topic