Platform Framework
R24 AMR | Min(s) read

Enabling Batch Caching

This section shows the concept of how batch caching is independent of external caching. Therefore, to avoid write-through caching, you can enable either of the caching mechanism using the following procedure.

  1. Open the tafj.properties file.
  2. Enable the following batch property.

    temn.cache.runtime.use.batch.write=true

  3. Disable the following external caching property.

    temn.tafj.runtime.use.external.caching=false

  4. Open SQL and create a batch enabled file by using the following command.

    CREATE-FILE BATCH.WRITE TYPE=XML BATCH_WRITE=8

    This step creates an XML file and a record in the TAFJ_CACHE table.

How batch caching works?

The step-4 of the above task creates a record in the TAFJ_CACHE table. For example, let us assume that the newly created record has the following properties:

  • RECID - BATCH.WRITE
  • CACHENAME - WRITECACHE
  • WRITEBATCHROWS - 8

Here, WRITEBATCHROWS specifies how frequently you can push or flush cached records into the database. It is important that you identify how much memory the batched tables will occupy and how many threads you want to run. Without adequate memory, you may encounter memory violations.

Therefore, in the above example, JBC WRITE statements upto the 8th row of the BATCH.WRITE table. On the 9th row, the record is pushed to the database and the internal cache is cleared. You should not commit the pushed records until the cache status reaches TRANSEND or TRANSABORT.

You can also set up existing tables for batch caching by inserting records into the TAFJ_CACHE table. This is possible only if the records have their RECID that matches the TAFJ_VOC RECID, a cache with a name WRITECACHE, and some valid integer for BATCH_WRITE.

Copyright © 2020- Temenos Headquarters SA

Published on :
Monday, May 27, 2024 5:03:08 PM IST