8 Create Static Asynchronous WriteThrough Cache Groups

An Asynchronous WriteThrough (AWT) cache group enforces a caching behavior where committed changes on the TimesTen cache tables are automatically and asynchronously propagated to the cached Oracle Database tables to keep these tables in the two databases synchronized.



The transaction commit on the TimesTen database occurs asynchronously from the commit on the Oracle database. This enables an application to continue issuing transactions on the TimesTen database without waiting for the Oracle database transactions to complete. When the changes resulting from the transactions in TimesTen are propagated to the Oracle database, transaction integrity and ordering is preserved. Transactions that have committed in TimesTen but have not yet made it to the Oracle database are protected by the TimesTen persistence mechanisms and, optionally, TimesTen high availability (if configured).

Since the AWT cache group uses the replication agent to asynchronously propagate transactions to the Oracle database, these transactions remain in the transaction log buffer and transaction log files until the replication agent confirms they have been fully processed by the Oracle database.

What happens if the data is modified on the Oracle database? Since data automatically flows from TimesTen cache to the Oracle database, any data changed in the cached Oracle database tables is not automatically propagated to the TimesTen cache. Changes propagated from the cache may overwrite changes made directly in the Oracle database. For tables that are cached using AWT, TimesTen should be considered the primary source where the application makes changes to the data. It is possible to refresh the AWT cache tables in TimesTen by using the REFRESH CACHE GROUP statement, which discards the table contents in TimesTen and repopulates the tables from the Oracle database.